mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Refactor action function wrapper creation in loadLuaUIPackage for clarity
This commit is contained in:
@@ -128,12 +128,8 @@ export async function loadLuaUIPackage(packagePath: string): Promise<LuaUIPackag
|
||||
const isFunction = lua.lua_isfunction(L, -1)
|
||||
|
||||
if (isFunction && typeof key === 'string') {
|
||||
// Create a closure that captures the Lua state and function
|
||||
const luaFunctionIndex = lua.lua_gettop(L)
|
||||
|
||||
// For now, we'll create a wrapper that executes the Lua function
|
||||
// This is a simplified version - in production you'd want to keep the engine alive
|
||||
const wrappedFunction = createLuaFunctionWrapper(engine, actionSource, key)
|
||||
// Create a wrapper that executes the Lua function
|
||||
const wrappedFunction = createLuaFunctionWrapper(actionSource, key)
|
||||
actions[key] = wrappedFunction
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user