Skip to content

Commit

Permalink
forgot about this dude
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryFrosty authored Aug 23, 2024
1 parent e0503c9 commit 64e9330
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/psychlua/ReflectionFunctions.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ class ReflectionFunctions
Lua_helper.add_callback(lua, "setProperty", function(variable:String, value:Dynamic, ?allowMaps:Bool = false) {
var split:Array<String> = variable.split('.');
if(split.length > 1) {
return LuaUtils.setVarInArray(LuaUtils.getPropertyLoop(split, true, allowMaps), split[split.length-1], value, allowMaps);
LuaUtils.setVarInArray(LuaUtils.getPropertyLoop(split, true, allowMaps), split[split.length-1], value, allowMaps);
return true;
}
return LuaUtils.setVarInArray(LuaUtils.getTargetInstance(), variable, value, allowMaps);
LuaUtils.setVarInArray(LuaUtils.getTargetInstance(), variable, value, allowMaps);
return true;
});
Lua_helper.add_callback(lua, "getPropertyFromClass", function(classVar:String, variable:String, ?allowMaps:Bool = false) {
var myClass:Dynamic = Type.resolveClass(classVar);
Expand Down

0 comments on commit 64e9330

Please sign in to comment.