compatibility changes for dadbattle + philly

'Dad Battle' is now called 'Dad Battle' in game and uses 'dadbattle' as files
'Philly' is now called 'Philly Nice' in game and uses 'philly' as files
This commit is contained in:
Lucky56
2021-06-08 07:13:33 +02:00
parent 338e17eacb
commit 8ac6249e2b
17 changed files with 122 additions and 29 deletions

View File

@ -202,13 +202,24 @@ class FreeplayState extends MusicBeatState
if (accepted)
{
trace(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase());
// pre lowercasing the song name
var songLowercase = switch (songs[curSelected].songName)
{
case 'Dad Battle':
StringTools.replace(songs[curSelected].songName," ", "").toLowerCase();
case 'Philly Nice':
StringTools.replace(songs[curSelected].songName," Nice", "").toLowerCase();
default:
StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase();
}
trace(songLowercase);
var poop:String = Highscore.formatSong(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase(), curDifficulty);
var poop:String = Highscore.formatSong(songLowercase, curDifficulty);
trace(poop);
PlayState.SONG = Song.loadFromJson(poop, StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase());
PlayState.SONG = Song.loadFromJson(poop, songLowercase);
PlayState.isStoryMode = false;
PlayState.storyDifficulty = curDifficulty;
PlayState.storyWeek = songs[curSelected].week;