diff --git a/osu.Game/Rulesets/Mods/ModFlashlight.cs b/osu.Game/Rulesets/Mods/ModFlashlight.cs
index 95406cc9e6..dc2ad6f47e 100644
--- a/osu.Game/Rulesets/Mods/ModFlashlight.cs
+++ b/osu.Game/Rulesets/Mods/ModFlashlight.cs
@@ -56,9 +56,6 @@ namespace osu.Game.Rulesets.Mods
public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{
Combo.BindTo(scoreProcessor.Combo);
-
- // Default value of ScoreProcessor's Rank in Flashlight Mod should be SS+
- scoreProcessor.Rank.Value = ScoreRank.XH;
}
public ScoreRank AdjustRank(ScoreRank rank, double accuracy)
diff --git a/osu.Game/Rulesets/Mods/ModHidden.cs b/osu.Game/Rulesets/Mods/ModHidden.cs
index 5a8226115f..8b25768575 100644
--- a/osu.Game/Rulesets/Mods/ModHidden.cs
+++ b/osu.Game/Rulesets/Mods/ModHidden.cs
@@ -17,8 +17,6 @@ namespace osu.Game.Rulesets.Mods
public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{
- // Default value of ScoreProcessor's Rank in Hidden Mod should be SS+
- scoreProcessor.Rank.Value = ScoreRank.XH;
}
public ScoreRank AdjustRank(ScoreRank rank, double accuracy)
diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs
index 837bb4080e..4ef65c55ab 100644
--- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs
+++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs
@@ -86,7 +86,9 @@ namespace osu.Game.Rulesets.Scoring
///
/// The current rank.
///
- public readonly Bindable Rank = new Bindable(ScoreRank.X);
+ public IBindable Rank => rank;
+
+ private readonly Bindable rank = new Bindable(ScoreRank.X);
///
/// The highest combo achieved by this score.
@@ -186,9 +188,9 @@ namespace osu.Game.Rulesets.Scoring
Combo.ValueChanged += combo => HighestCombo.Value = Math.Max(HighestCombo.Value, combo.NewValue);
Accuracy.ValueChanged += accuracy =>
{
- Rank.Value = RankFromAccuracy(accuracy.NewValue);
+ rank.Value = RankFromAccuracy(accuracy.NewValue);
foreach (var mod in Mods.Value.OfType())
- Rank.Value = mod.AdjustRank(Rank.Value, accuracy.NewValue);
+ rank.Value = mod.AdjustRank(Rank.Value, accuracy.NewValue);
};
Mods.ValueChanged += mods =>
@@ -411,8 +413,8 @@ namespace osu.Game.Rulesets.Scoring
TotalScore.Value = 0;
Accuracy.Value = 1;
Combo.Value = 0;
- Rank.Disabled = false;
- Rank.Value = ScoreRank.X;
+ rank.Disabled = false;
+ rank.Value = ScoreRank.X;
HighestCombo.Value = 0;
}
@@ -448,7 +450,7 @@ namespace osu.Game.Rulesets.Scoring
return;
score.Passed = false;
- Rank.Value = ScoreRank.F;
+ rank.Value = ScoreRank.F;
PopulateScore(score);
}
diff --git a/osu.Game/Screens/Play/BreakOverlay.cs b/osu.Game/Screens/Play/BreakOverlay.cs
index 3ca82ec00b..e18612c955 100644
--- a/osu.Game/Screens/Play/BreakOverlay.cs
+++ b/osu.Game/Screens/Play/BreakOverlay.cs
@@ -4,12 +4,14 @@
#nullable disable
using System.Collections.Generic;
+using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets.Scoring;
+using osu.Game.Scoring;
using osu.Game.Screens.Play.Break;
namespace osu.Game.Screens.Play
@@ -113,7 +115,7 @@ namespace osu.Game.Screens.Play
if (scoreProcessor != null)
{
info.AccuracyDisplay.Current.BindTo(scoreProcessor.Accuracy);
- info.GradeDisplay.Current.BindTo(scoreProcessor.Rank);
+ ((IBindable)info.GradeDisplay.Current).BindTo(scoreProcessor.Rank);
}
}
diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs
index df50e35986..b87306b9a2 100644
--- a/osu.Game/Screens/Play/Player.cs
+++ b/osu.Game/Screens/Play/Player.cs
@@ -801,8 +801,6 @@ namespace osu.Game.Screens.Play
// This player instance may already be in the process of exiting.
return;
- Debug.Assert(ScoreProcessor.Rank.Value != ScoreRank.F);
-
this.Push(CreateResults(prepareScoreForDisplayTask.GetResultSafely()));
}, Time.Current + delay, 50);