Skip to content

Commit

Permalink
added modifiers indicator on the leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Hermanest committed Jul 24, 2023
1 parent a0fc803 commit 1f30cfb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/8_UI/Leaderboard/Components/Header/MapStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void SetValues(RankedStatus rankedStatus, DiffInfo diffInfo) {
private void UpdateVisuals() {
MapDifficultyPanel.NotifyDiffInfoChanged(_diffInfo);
var stars = _diffInfo.stars;
var modifiersApplied = false;
if (_diffInfo.modifiersRating is { } rating &&
_gameplayModifiers is { songSpeed: not GameplayModifiers.SongSpeed.Normal } modifiers) {
stars = modifiers.songSpeed switch {
Expand All @@ -62,8 +63,12 @@ private void UpdateVisuals() {
GameplayModifiers.SongSpeed.SuperFast => rating.sfStars,
_ => stars,
};
modifiersApplied = true;
}
_statusText.text = _diffInfo.stars > 0 ? $"{_rankedStatus}: {FormatUtils.FormatStars(stars)}" : _rankedStatus.ToString();
var text = _rankedStatus.ToString();
var modifiersIndicator = modifiersApplied ? "<color=green>[M]</color>" : string.Empty;
if (_diffInfo.stars > 0) text += $": {FormatUtils.FormatStars(stars)} {modifiersIndicator}";
_statusText.text = text;
}

#endregion
Expand Down

0 comments on commit 1f30cfb

Please sign in to comment.