diff --git a/source/backend/HighScore.hx b/source/backend/HighScore.hx index 47a424b..817ed9c 100644 --- a/source/backend/HighScore.hx +++ b/source/backend/HighScore.hx @@ -8,11 +8,13 @@ class HighScore { if (songScores.exists(song)) { if (songScores.get(song) < score) { setScore(song, score); - if (rating >= 0) setRating(song, rating); + if (rating >= 0) + setRating(song, rating); } } else { setScore(song, score); - if (rating >= 0) setRating(song, rating); + if (rating >= 0) + setRating(song, rating); } } diff --git a/source/backend/Utilities.hx b/source/backend/Utilities.hx index c7cf776..922ce03 100644 --- a/source/backend/Utilities.hx +++ b/source/backend/Utilities.hx @@ -6,6 +6,9 @@ class Utilities { return Math.max(min, Math.min(max, value)); public static function truncateFloat(number:Float, precision:Int):Float { + if (precision < 1) + return Math.ffloor(number); + var num = number; num = num * Math.pow(10, precision); num = Math.round(num) / Math.pow(10, precision); diff --git a/source/states/AchievementsState.hx b/source/states/AchievementsState.hx index a0a51a5..a5fa5fd 100644 --- a/source/states/AchievementsState.hx +++ b/source/states/AchievementsState.hx @@ -127,7 +127,7 @@ class AchievementsState extends ExtendableState { + achievementArray[curSelected].hint + '\nDate Unlocked: ' + stat.date - + 'Song Unlocked: ' + + '\nSong Unlocked: ' + stat.song : 'This achievement has not been unlocked yet!' + '\nHint: ' + achievementArray[curSelected].hint; diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index 4753e5b..a83300e 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -471,7 +471,8 @@ class PlayState extends ExtendableState { for (i in 0...justPressed.length) { if (justPressed[i]) { - strumline.members[i].press(); + if (!SaveData.settings.botPlay) + strumline.members[i].press(); if (SaveData.settings.antiMash) { FlxG.sound.play(Paths.sound('miss${FlxG.random.int(1, 4)}'), 0.65); isPerfect = false; @@ -698,7 +699,7 @@ class PlayState extends ExtendableState { } if (!SaveData.settings.botPlay) - HighScore.saveScore(song.song, score, accuracy); + HighScore.saveScore(song.song, score, Utilities.truncateFloat(accuracy, 2)); new FlxTimer().start(0.5, (tmr:FlxTimer) -> { persistentUpdate = true; openSubState(new ResultsSubState(rank, score, accuracy)); diff --git a/source/states/SongSelectState.hx b/source/states/SongSelectState.hx index 7e5cca5..75bf7d3 100644 --- a/source/states/SongSelectState.hx +++ b/source/states/SongSelectState.hx @@ -112,7 +112,7 @@ class SongSelectState extends ExtendableState { lerpRating = intendedRating; if (!isResetting) - panelTxt.text = Localization.get("scoreTxt", SaveData.settings.lang) + lerpScore + "(" + lerpRating + ")%" + " // " + Localization.get("diffTxt", SaveData.settings.lang) + panelTxt.text = Localization.get("scoreTxt", SaveData.settings.lang) + lerpScore + " (" + Utilities.truncateFloat(lerpRating * 100, 2) + ")%" + " // " + Localization.get("diffTxt", SaveData.settings.lang) + Std.string(songListData.songs[currentIndex].diff) + "/5"; if (!lockInputs) {