1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-03-21 01:19:26 +00:00

[BUGFIX] Fixed Ranks not appearing in freeplay for custom variations

Freeplay tries to access a song's rank using the current difficulty name alone, but custom variation ranks are being saved with a variation prefix. This PR makes freeplay look for the variation prefix when necessary.
This commit is contained in:
AppleHair 2024-06-14 16:53:33 +03:00 committed by EliteMasterEric
parent ad57e64994
commit bd17d965f5

View file

@ -2158,8 +2158,13 @@ class FreeplaySongData
{
this.albumId = songDifficulty.album;
}
// TODO: This line of code makes me sad, but you can't really fix it without a breaking migration.
// `easy`, `erect`, `normal-pico`, etc.
var suffixedDifficulty = (songDifficulty.variation != Constants.DEFAULT_VARIATION
&& songDifficulty.variation != 'erect') ? '$currentDifficulty-${songDifficulty.variation}' : currentDifficulty;
this.scoringRank = Save.instance.getSongRank(songId, currentDifficulty);
this.scoringRank = Save.instance.getSongRank(songId, suffixedDifficulty);
this.isNew = song.isSongNew(currentDifficulty);
}