diff --git a/source/PlayState.hx b/source/PlayState.hx index b5107eb..30cd5aa 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -344,7 +344,22 @@ class PlayState extends MusicBeatState dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue')); } - switch(SONG.stage) + //defaults if no stage was found in chart + + var stageCheck:String = 'stage'; + //i should check if its stage (but this is when none is found in chart anyway) + if (SONG.stage == null) { + switch(storyWeek) + { + case 2: stageCheck = 'halloween'; + case 3: stageCheck = 'philly'; + case 4: stageCheck = 'limo'; + case 5: if (songLowercase == 'winter-horrorland') {stageCheck = 'mallEvil';} else {stageCheck = 'mall';} + case 6: if (songLowercase == 'thorns') {stageCheck = 'schoolEvil';} else {stageCheck = 'school';} + } + } else {stageCheck = SONG.stage;} + + switch(stageCheck) { case 'halloween': { diff --git a/source/Song.hx b/source/Song.hx index 00d8e94..872fb74 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -35,7 +35,7 @@ class Song public var player2:String = 'dad'; public var gfVersion:String = 'gf'; public var noteStyle:String = 'normal'; - public var stage:String = 'stage'; + public var stage:String = ''; public function new(song, notes, bpm) { @@ -47,8 +47,8 @@ class Song public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong { trace(jsonInput); - - // pre lowercasing the song name (update) + + // pre lowercasing the folder name var folderLowercase = StringTools.replace(folder, " ", "-").toLowerCase(); switch (folderLowercase) { case 'dad-battle': folderLowercase = 'dadbattle';