1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-02-05 03:00:27 +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 GitHub
parent 9908f973cf
commit 1f1fe62a06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2094,8 +2094,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);
}