Skip to content

Commit

Permalink
v0.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sayofthelor committed Sep 9, 2023
1 parent dfd25a0 commit 4437be8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion engineVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.1
0.8.2
18 changes: 17 additions & 1 deletion source/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3527,7 +3527,7 @@ class HScript
}

public function new()
{
@:privateAccess {
interp = new Interp();
interp.variables.set('FlxG', FlxG);
interp.variables.set('FlxSprite', FlxSprite);
Expand Down Expand Up @@ -3570,6 +3570,22 @@ class HScript
}
return false;
});
interp.variables.set("async", (f:Void->Void) -> {
#if sys
sys.thread.Thread.create(f);
#else
FlxG.log.warn("Non-sys platform detected, function will run on main thread.");
f();
#end
});
interp.variables.set("switchState", MusicBeatState.switchState);
interp.variables.set("ModdedState", lore.ModdedState);
interp.variables.set("ModdedSubState", lore.ModdedSubState);
interp.variables.set("FlxAxes", lore.FunkinHX._dynamicify(lore.macros.MacroTools.getMapFromAbstract(flixel.util.FlxAxes)));
interp.variables.set("FlxColor", lore.FunkinHX._dynamicify(lore.macros.MacroTools.getMapFromAbstract(flixel.util.FlxColor)));
interp.variables.set("FlxKey", lore.FunkinHX._dynamicify(lore.macros.MacroTools.getMapFromAbstract(flixel.input.keyboard.FlxKey)));
interp.variables.set("FlxPoint", flixel.math.FlxPoint.FlxBasePoint);
interp.variables.set("HScriptType", lore.FunkinHX._dynamicify(lore.macros.MacroTools.getMapFromAbstract(lore.FunkinHX.HScriptType)));
}

public function execute(codeToRun:String):Dynamic
Expand Down

0 comments on commit 4437be8

Please sign in to comment.