Skip to content

Commit

Permalink
uhhhhh
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryFrosty committed Sep 7, 2024
1 parent 9be25a3 commit b47b68d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 0 additions & 6 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ class Main extends Sprite
FlxG.scaleMode = new MobileScaleMode();
#end

#if HSCRIPT_ALLOWED
crowplexus.iris.Iris.logLevel = function(level: crowplexus.iris.ErrorSeverity, x, ?pos: haxe.PosInfos): Void {
if (PlayState.instance != null) PlayState.instance.addTextToDebug("ERROR: "+Std.string(x), FlxColor.RED);
}
#end

// shader coords fix
FlxG.signals.gameResized.add(function (w, h) {
if(fpsVar != null)
Expand Down
13 changes: 11 additions & 2 deletions source/psychlua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,20 @@ class HScript extends Iris
}
#end

public function executeScript(code:String, ?varsToBring:Any = null):Dynamic {
public function executeScript(code:String, ?varsToBring:Any = null):Dynamic
{
this.varsToBring = varsToBring;
scriptCode = code;
parse(true);
return returnValue = execute();
try
{
returnValue = execute();
}
catch(e)
{
PlayState.instance.addTextToDebug('ERROR (${this.origin}:${this.interp.posInfos()}): ${e}', FlxColor.RED);
}
return returnValue;
}

/*override function irisPrint(v):Void
Expand Down

0 comments on commit b47b68d

Please sign in to comment.