diff --git a/source/modding/ModchartUtilities.hx b/source/modding/ModchartUtilities.hx index bdd53e54b7..0b4676f44e 100644 --- a/source/modding/ModchartUtilities.hx +++ b/source/modding/ModchartUtilities.hx @@ -1056,6 +1056,7 @@ class ModchartUtilities { } }); + // actors setLuaFunction("makeNoteCopy", function(id:String, noteIdx:Int) { @@ -1385,7 +1386,7 @@ class ModchartUtilities { getActorByName(id).singAnimPrefix = prefix; } }); - + setLuaFunction("setCharacterPreventDanceForAnim", function(id:String, preventDanceForAnim:Bool = true) { if(getCharacterByName(id) != null) { diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index 044464136e..a018e3fed1 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -1105,15 +1105,15 @@ class PlayState extends MusicBeatState { } } - if (sys.FileSystem.exists("mods/" + Options.getData("curMod") + "/data/scripts/local/")){ - var localScripts = sys.FileSystem.readDirectory("mods/" + Options.getData("curMod") + "/data/song data/" + curSong + "/"); - if (localScripts.length > 0){ - for (file in localScripts){ + if (sys.FileSystem.exists("mods/" + Options.getData("curMod") + "/data/song data/" + curSong + "/")){ + var songScripts = sys.FileSystem.readDirectory("mods/" + Options.getData("curMod") + "/data/song data/" + curSong + "/"); + if (songScripts.length > 0){ + for (file in songScripts){ if(file.endsWith('.hx')){ - localScript = new HScript("mods/" + Options.getData("curMod") + "/data/song data/" + curSong + "/" + file, true); - localScript.start(); + songScript = new HScript("mods/" + Options.getData("curMod") + "/data/song data/" + curSong + "/" + file, true); + songScript.start(); - scripts.push(localScript); + scripts.push(songScript); } #if linc_luajit if(file.endsWith('.lua')){