fixed everything

highscore would be compatible if the package wasn't changed to KadeDev's own
This commit is contained in:
Lucky56
2021-06-09 00:36:28 +02:00
parent 2d4637cca1
commit fab3e8ecb4
4 changed files with 41 additions and 19 deletions

View File

@ -202,16 +202,23 @@ class FreeplayState extends MusicBeatState
if (accepted)
{
// pre lowercasing the song name
// pre lowercasing the song name (update)
var songLowercase = StringTools.replace(songs[curSelected].songName, " ", "-").toLowerCase();
switch (songLowercase) {
case 'dad-battle': songLowercase = 'dadbattle';
case 'philly-nice': songLowercase = 'philly';
}
// adjusting the highscore song name to be compatible (update)
// would read original scores if we didn't change packages
var songHighscore = StringTools.replace(songs[curSelected].songName, " ", "-");
switch (songHighscore) {
case 'Dad-Battle': songHighscore = 'Dadbattle';
case 'Philly-Nice': songHighscore = 'Philly';
}
trace(songLowercase);
var poop:String = Highscore.formatSong(songLowercase, curDifficulty);
var poop:String = Highscore.formatSong(songHighscore, curDifficulty);
trace(poop);
@ -233,8 +240,15 @@ class FreeplayState extends MusicBeatState
if (curDifficulty > 2)
curDifficulty = 0;
// adjusting the highscore song name to be compatible (changeDiff)
var songHighscore = StringTools.replace(songs[curSelected].songName, " ", "-");
switch (songHighscore) {
case 'Dad-Battle': songHighscore = 'Dadbattle';
case 'Philly-Nice': songHighscore = 'Philly';
}
#if !switch
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
#end
switch (curDifficulty)
@ -265,9 +279,17 @@ class FreeplayState extends MusicBeatState
curSelected = 0;
// selector.y = (70 * curSelected) + 30;
// adjusting the highscore song name to be compatible (changeSelection)
// would read original scores if we didn't change packages
var songHighscore = StringTools.replace(songs[curSelected].songName, " ", "-");
switch (songHighscore) {
case 'Dad-Battle': songHighscore = 'Dadbattle';
case 'Philly-Nice': songHighscore = 'Philly';
}
#if !switch
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
intendedScore = Highscore.getScore(songHighscore, curDifficulty);
// lerpScore = 0;
#end