mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-10 06:07:09 +00:00
add completion check
This commit is contained in:
parent
9b483de1da
commit
0c5815c176
|
@ -545,11 +545,14 @@ class Save
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var newCompletion = (newScoreData.tallies.sick + newScoreData.tallies.good) / newScoreData.tallies.totalNotes;
|
||||||
|
var previousCompletion = (previousScoreData.tallies.sick + previousScoreData.tallies.good) / previousScoreData.tallies.totalNotes;
|
||||||
|
|
||||||
// Set the high score and the high rank separately.
|
// Set the high score and the high rank separately.
|
||||||
var newScore:SaveScoreData =
|
var newScore:SaveScoreData =
|
||||||
{
|
{
|
||||||
score: (previousScoreData.score > newScoreData.score) ? previousScoreData.score : newScoreData.score,
|
score: (previousScoreData.score > newScoreData.score) ? previousScoreData.score : newScoreData.score,
|
||||||
tallies: (previousRank > newRank) ? previousScoreData.tallies : newScoreData.tallies
|
tallies: (previousRank > newRank || previousCompletion > newCompletion) ? previousScoreData.tallies : newScoreData.tallies
|
||||||
};
|
};
|
||||||
|
|
||||||
song.set(difficultyId, newScore);
|
song.set(difficultyId, newScore);
|
||||||
|
|
Loading…
Reference in a new issue