diff --git a/engineVersion.txt b/engineVersion.txt index c18d72be3..53a48a1e8 100644 --- a/engineVersion.txt +++ b/engineVersion.txt @@ -1 +1 @@ -0.8.1 \ No newline at end of file +0.8.2 \ No newline at end of file diff --git a/source/FunkinLua.hx b/source/FunkinLua.hx index cb3e3d8b8..7d402d8b7 100644 --- a/source/FunkinLua.hx +++ b/source/FunkinLua.hx @@ -3527,7 +3527,7 @@ class HScript } public function new() - { + @:privateAccess { interp = new Interp(); interp.variables.set('FlxG', FlxG); interp.variables.set('FlxSprite', FlxSprite); @@ -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