Skip to content

Commit

Permalink
Updated linc_luajit, hxvlc and hscript-iris
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowMario committed Sep 15, 2024
1 parent 325f025 commit 66b9225
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

<!--Psych stuff needed-->
<haxelib name="linc_luajit" if="LUA_ALLOWED"/>
<haxelib name="hscript-iris" if="HSCRIPT_ALLOWED" version="1.0.2"/>
<haxelib name="hscript-iris" if="HSCRIPT_ALLOWED" version="1.1.0"/>
<haxelib name="hxvlc" if="VIDEOS_ALLOWED" version="1.8.2"/>
<haxelib name="hxdiscord_rpc" version="1.2.4" if="DISCORD_ALLOWED"/>
<haxelib name="flxanimate"/>
Expand Down
10 changes: 5 additions & 5 deletions setup/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!
8 changes: 4 additions & 4 deletions setup/windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 6 additions & 12 deletions source/psychlua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -47,7 +41,7 @@ class HScript extends Iris
hs.varsToBring = varsToBring;
try
{
hs.scriptStr = code;
hs.scriptCode = code;
hs.execute();
}
catch(e:Dynamic)
Expand All @@ -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;
Expand Down Expand Up @@ -95,7 +89,7 @@ class HScript extends Iris
scriptThing = File.getContent(f);
}
}
this.scriptStr = scriptThing;
this.scriptCode = scriptThing;

preset();
execute();
Expand Down Expand Up @@ -343,7 +337,7 @@ class HScript extends Iris
try
{
final callValue:IrisCall = call(funcToRun, funcArgs);
return callValue.methodVal;
return callValue.signature;
}
catch(e:Dynamic)
{
Expand All @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 66b9225

Please sign in to comment.