@@ -351,6 +351,7 @@ class FunkinLua {
351351 }
352352 luaTrace (" addLuaScript: Script doesn't exist!" , false , false , FlxColor .RED );
353353 });
354+
354355 Lua_helper .add_callback (lua , " addHScript" , function (scriptFile : String , ? ignoreAlreadyRunning : Bool = false ) {
355356 #if HSCRIPT_ALLOWED
356357 var scriptPath : String = findScript (scriptFile , ' .hx' );
@@ -372,6 +373,7 @@ class FunkinLua {
372373 luaTrace (" addHScript: HScript is not supported on this platform!" , false , false , FlxColor .RED );
373374 #end
374375 });
376+
375377 Lua_helper .add_callback (lua , " removeLuaScript" , function (luaFile : String ) {
376378 var luaPath : String = findScript (luaFile );
377379 if (luaPath != null )
@@ -392,6 +394,7 @@ class FunkinLua {
392394 luaTrace (' removeLuaScript: Script $luaFile isn \' t running!' , false , false , FlxColor .RED );
393395 return false ;
394396 });
397+
395398 Lua_helper .add_callback (lua , " removeHScript" , function (scriptFile : String ) {
396399 #if HSCRIPT_ALLOWED
397400 var scriptPath : String = findScript (scriptFile , ' .hx' );
@@ -459,6 +462,7 @@ class FunkinLua {
459462 spr .loadGraphic (Paths .image (image ), animated , gridX , gridY );
460463 }
461464 });
465+
462466 Lua_helper .add_callback (lua , " loadFrames" , function (variable : String , image : String , spriteType : String = ' auto' ) {
463467 var split : Array <String > = variable .split (' .' );
464468 var spr : FlxSprite = LuaUtils .getObjectDirectly (split [0 ]);
@@ -471,6 +475,7 @@ class FunkinLua {
471475 LuaUtils .loadFrames (spr , image , spriteType );
472476 }
473477 });
478+
474479 Lua_helper .add_callback (lua , " loadMultipleFrames" , function (variable : String , images : Array <String >) {
475480 var split : Array <String > = variable .split (' .' );
476481 var spr : FlxSprite = LuaUtils .getObjectDirectly (split [0 ]);
@@ -514,6 +519,7 @@ class FunkinLua {
514519 luaTrace (' getObjectOrder: Object $obj doesn \' t exist!' , false , false , FlxColor .RED );
515520 return - 1 ;
516521 });
522+
517523 Lua_helper .add_callback (lua , " setObjectOrder" , function (obj : String , position : Int , ? group : String = null ) {
518524 var leObj : FlxBasic = LuaUtils .getObjectDirectly (obj );
519525 if (leObj != null )
@@ -1767,6 +1773,15 @@ class FunkinLua {
17671773 var strumNote : StrumNote = PlayState .instance .strumLineNotes .members [note % PlayState .instance .strumLineNotes .length ];
17681774 if (strumNote == null ) return null ;
17691775
1776+ for (field in PlayState .instance .playfields .members ) {
1777+ if (field .strumNotes .contains (strumNote )) {
1778+ var i = field .strumNotes .indexOf (strumNote );
1779+ if (i != - 1 ) {
1780+ strumNote = field .strumNotes [i ];
1781+ }
1782+ }
1783+ }
1784+
17701785 if (tag != null )
17711786 {
17721787 var originalTag : String = tag ;
0 commit comments