From 3c773415aa7e9d220178c37be497f6672d493cc7 Mon Sep 17 00:00:00 2001 From: Vortex2Oblivion <73261680+Vortex2Oblivion@users.noreply.github.com> Date: Sun, 12 Nov 2023 16:28:04 -0500 Subject: [PATCH] fix for something --- source/modding/ModchartUtilities.hx | 3 ++- source/states/PlayState.hx | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) 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')){