Skip to content

Commit 75e934f

Browse files
HeroEyadNexIsDumb
andauthored
Difficulty based scripts (#623)
Makes possible things like `songs/dadbattle/scripts/erect/`. * exclusive difficulty scripts * fixing a small ordering bug + optimization * actually, allowing both scripts to exist * im a super fucking dumbass * SPACES!!! * suggestion from sen --------- Co-authored-by: ⍚~Nex <[email protected]>
1 parent 315c5e0 commit 75e934f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/funkin/game/PlayState.hx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,11 @@ class PlayState extends MusicBeatState
609609
// case "":
610610
// ADD YOUR HARDCODED SCRIPTS HERE!
611611
default:
612-
var scriptsFolders:Array<String> = ['songs/${SONG.meta.name.toLowerCase()}/scripts', 'data/charts/', 'songs/'];
612+
var normal = 'songs/${SONG.meta.name.toLowerCase()}/scripts';
613+
var scriptsFolders:Array<String> = [normal, normal + '/$difficulty/', 'data/charts/', 'songs/'];
613614

614-
for(folder in scriptsFolders) {
615-
for(file in Paths.getFolderContent(folder, true, fromMods ? MODS : BOTH)) {
615+
for (folder in scriptsFolders) {
616+
for (file in Paths.getFolderContent(folder, true, fromMods ? MODS : BOTH)) {
616617
if (folder == 'data/charts/')
617618
Logs.trace('data/charts/ is deprecrated and will be removed in the future. Please move script $file to songs/', WARNING, DARKYELLOW);
618619

0 commit comments

Comments
 (0)