From c9f841f28fc2dae1b300ab0ed24dec08d943bf42 Mon Sep 17 00:00:00 2001 From: Lily Date: Tue, 20 Aug 2024 01:11:41 +0300 Subject: [PATCH] TFunction support on set(?) --- source/psychlua/FunkinLua.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/psychlua/FunkinLua.hx b/source/psychlua/FunkinLua.hx index ed136ee8550..518b925aef7 100644 --- a/source/psychlua/FunkinLua.hx +++ b/source/psychlua/FunkinLua.hx @@ -1637,6 +1637,11 @@ class FunkinLua { return; } + if (Type.typeof(data) == TFunction) { + Lua_helper.add_callback(lua, variable, data); + return; + } + Convert.toLua(lua, data); Lua.setglobal(lua, variable); } @@ -1839,4 +1844,4 @@ class FunkinLua { return false; } } -#end \ No newline at end of file +#end