From 85ca76bcbbd50cfeda059a5a269febae37d3b8d4 Mon Sep 17 00:00:00 2001 From: JordanSantiagoYT Date: Fri, 2 Aug 2024 14:26:13 -0400 Subject: [PATCH] possible fix for the game not reading the scripts folderf --- source/PlayState.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index e92fb918..dda96d07 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -816,7 +816,10 @@ class PlayState extends MusicBeatState // "GLOBAL" SCRIPTS #if LUA_ALLOWED - for (folder in Paths.directoriesWithFile(Paths.getPreloadPath(), 'scripts/')) + var foldersToCheck:Array = [Paths.getPreloadPath('scripts/')]; + for (folder in Paths.directoriesWithFile('scripts/', '')) foldersToCheck.insert(0, folder); + + for (folder in foldersToCheck) for (file in FileSystem.readDirectory(folder)) { if(file.toLowerCase().endsWith('.lua')) {