Skip to content

Commit

Permalink
Color statistics row based on minimum result
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Sep 28, 2024
1 parent 2cba73b commit 6d91da0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions osu.Game.Rulesets.Sentakki/Statistics/JudgementChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,8 @@ public JudgementChart(IReadOnlyList<HitEvent> hitEvents)

int sum = results.Sum(kvp => kvp.Value);

bool perfected = sum == results.GetValueOrDefault(HitResult.Perfect) + results.GetValueOrDefault(HitResult.Great);
bool critPerfect = sum == results.GetValueOrDefault(HitResult.Perfect);

Color4 specialColor = Color4.White;

if (critPerfect)
specialColor = HitResult.Perfect.GetColorForSentakkiResult();
else if (perfected)
specialColor = HitResult.Great.GetColorForSentakkiResult();

HitResult minResult = sum == 0 ? HitResult.Perfect : results.MinBy(kvp => kvp.Key).Key;
Color4 specialColor = minResult.GetColorForSentakkiResult();

// The alpha will be used to "disable" an hitobject entry if they don't exist
float commonAlpha = sum == 0 ? 0.1f : 1;
Expand Down

0 comments on commit 6d91da0

Please sign in to comment.