Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some lua improvements #15088

Open
wants to merge 25 commits into
base: experimental
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
forgot about this dude
  • Loading branch information
LarryFrosty committed Aug 23, 2024
commit 64e933032a461558d9ca52c7da14043c757fe6da
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