From 66b9225b6b2deba59363e4ad0c8464a9e5b32e5e Mon Sep 17 00:00:00 2001 From: ShadowMario <44785097+ShadowMario@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:29:41 -0300 Subject: [PATCH] Updated linc_luajit, hxvlc and hscript-iris --- Project.xml | 2 +- setup/unix.sh | 10 +++++----- setup/windows.bat | 8 ++++---- source/psychlua/HScript.hx | 18 ++++++------------ source/states/PlayState.hx | 2 +- 5 files changed, 17 insertions(+), 23 deletions(-) diff --git a/Project.xml b/Project.xml index 202fb95769f..913f0930db8 100644 --- a/Project.xml +++ b/Project.xml @@ -110,7 +110,7 @@ - + diff --git a/setup/unix.sh b/setup/unix.sh index 3dcbda50b47..c3477882abc 100755 --- a/setup/unix.sh +++ b/setup/unix.sh @@ -11,13 +11,13 @@ haxelib install lime 8.1.2 haxelib install openfl 9.3.3 haxelib install flixel 5.6.1 haxelib install flixel-addons 3.2.2 -haxelib install flixel-tools 1.5.1 -haxelib install hscript-iris 1.0.2 +haxelib install flixel-tools 1.5.1 +haxelib install hscript-iris 1.1.0 haxelib install tjson 1.4.0 haxelib install hxdiscord_rpc 1.2.4 +haxelib install hxvlc 1.8.2 haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate 768740a56b26aa0c072720e0d1236b94afe68e3e -haxelib git linc_luajit https://github.com/superpowers04/linc_luajit 633fcc051399afed6781dd60cbf30ed8c3fe2c5a -haxelib git hxvlc https://github.com/MAJigsaw77/hxvlc 70e7f5f3e76d526ac6fb8f0e6665efe7dfda589d -haxelib git funkin.vis https://github.com/FunkinCrew/funkVis d5361037efa3a02c4ab20b5bd14ca11e7d00f519 +haxelib git linc_luajit https://github.com/superpowers04/linc_luajit 1906c4a96f6bb6df66562b3f24c62f4c5bba14a7 +haxelib git funkin.vis https://github.com/FunkinCrew/funkVis 22b1ce089dd924f15cdc4632397ef3504d464e90 haxelib git grig.audio https://gitlab.com/haxe-grig/grig.audio.git cbf91e2180fd2e374924fe74844086aab7891666 echo Finished! diff --git a/setup/windows.bat b/setup/windows.bat index 6cf3d5b3726..f998fe85c9a 100644 --- a/setup/windows.bat +++ b/setup/windows.bat @@ -9,13 +9,13 @@ haxelib install openfl 9.3.3 haxelib install flixel 5.6.1 haxelib install flixel-addons 3.2.2 haxelib install flixel-tools 1.5.1 -haxelib install hscript-iris 1.0.2 +haxelib install hscript-iris 1.1.0 haxelib install tjson 1.4.0 haxelib install hxdiscord_rpc 1.2.4 +haxelib install hxvlc 1.8.2 haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate 768740a56b26aa0c072720e0d1236b94afe68e3e -haxelib git linc_luajit https://github.com/superpowers04/linc_luajit 633fcc051399afed6781dd60cbf30ed8c3fe2c5a -haxelib git hxvlc https://github.com/MAJigsaw77/hxvlc 70e7f5f3e76d526ac6fb8f0e6665efe7dfda589d -haxelib git funkin.vis https://github.com/FunkinCrew/funkVis d5361037efa3a02c4ab20b5bd14ca11e7d00f519 +haxelib git linc_luajit https://github.com/superpowers04/linc_luajit 1906c4a96f6bb6df66562b3f24c62f4c5bba14a7 +haxelib git funkin.vis https://github.com/FunkinCrew/funkVis 22b1ce089dd924f15cdc4632397ef3504d464e90 haxelib git grig.audio https://gitlab.com/haxe-grig/grig.audio.git cbf91e2180fd2e374924fe74844086aab7891666 echo Finished! pause diff --git a/source/psychlua/HScript.hx b/source/psychlua/HScript.hx index 2840ce32ae7..ef1191a0b7a 100644 --- a/source/psychlua/HScript.hx +++ b/source/psychlua/HScript.hx @@ -12,12 +12,6 @@ import psychlua.FunkinLua; #if HSCRIPT_ALLOWED import crowplexus.iris.Iris; -typedef IrisCall = { - var methodName:String; - var methodReturn:Dynamic; - var methodVal:Dynamic; -}; - class HScript extends Iris { public var filePath:String; @@ -47,7 +41,7 @@ class HScript extends Iris hs.varsToBring = varsToBring; try { - hs.scriptStr = code; + hs.scriptCode = code; hs.execute(); } catch(e:Dynamic) @@ -64,7 +58,7 @@ class HScript extends Iris if (file == null) file = ''; - super(null, {name: "hscript-iris", autoRun: false, preset: false}); + super(null, {name: "hscript-iris", autoRun: false, autoPreset: false}); #if LUA_ALLOWED parentLua = parent; @@ -95,7 +89,7 @@ class HScript extends Iris scriptThing = File.getContent(f); } } - this.scriptStr = scriptThing; + this.scriptCode = scriptThing; preset(); execute(); @@ -343,7 +337,7 @@ class HScript extends Iris try { final callValue:IrisCall = call(funcToRun, funcArgs); - return callValue.methodVal; + return callValue.signature; } catch(e:Dynamic) { @@ -367,7 +361,7 @@ class HScript extends Iris final retVal:IrisCall = funk.hscript.executeCode(funcToRun, funcArgs); if (retVal != null) { - return (retVal.methodVal == null || LuaUtils.isOfTypes(retVal.methodVal, [Bool, Int, Float, String, Array])) ? retVal.methodVal : null; + return (retVal.signature == null || LuaUtils.isOfTypes(retVal.signature, [Bool, Int, Float, String, Array])) ? retVal.signature : null; } } catch(e:Dynamic) @@ -388,7 +382,7 @@ class HScript extends Iris final retVal:IrisCall = funk.hscript.executeFunction(funcToRun, funcArgs); if (retVal != null) { - return (retVal.methodVal == null || LuaUtils.isOfTypes(retVal.methodVal, [Bool, Int, Float, String, Array])) ? retVal.methodVal : null; + return (retVal.signature == null || LuaUtils.isOfTypes(retVal.signature, [Bool, Int, Float, String, Array])) ? retVal.signature : null; } } catch(e:Dynamic) diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index 4330f43ba09..ed86701353f 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -3345,7 +3345,7 @@ class PlayState extends MusicBeatState try { var callValue = script.call(funcToCall, args); - var myValue:Dynamic = callValue.methodVal; + var myValue:Dynamic = callValue.signature; // compiler fuckup fix final stopHscript = myValue == LuaUtils.Function_StopHScript;