mirror of
https://github.com/ppy/osu.git
synced 2025-01-09 03:02:56 +08:00
Make RankFromScore()
's dictionary param readonly
Just to make sure nobody tries any "funny" business.
This commit is contained in:
parent
5bae9074aa
commit
cb8ec48717
@ -89,7 +89,7 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
|||||||
return baseIncrease * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(combo_cap, combo_base));
|
return baseIncrease * Math.Min(Math.Max(0.5, Math.Log(result.ComboAfterJudgement, combo_base)), Math.Log(combo_cap, combo_base));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||||
{
|
{
|
||||||
if (accuracy == accuracy_cutoff_x)
|
if (accuracy == accuracy_cutoff_x)
|
||||||
return ScoreRank.X;
|
return ScoreRank.X;
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||||
{
|
{
|
||||||
ScoreRank rank = base.RankFromScore(accuracy, results);
|
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
|||||||
* strongScaleValue(result);
|
* strongScaleValue(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
public override ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||||
{
|
{
|
||||||
ScoreRank rank = base.RankFromScore(accuracy, results);
|
ScoreRank rank = base.RankFromScore(accuracy, results);
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Given an accuracy (0..1), return the correct <see cref="ScoreRank"/>.
|
/// Given an accuracy (0..1), return the correct <see cref="ScoreRank"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual ScoreRank RankFromScore(double accuracy, Dictionary<HitResult, int> results)
|
public virtual ScoreRank RankFromScore(double accuracy, IReadOnlyDictionary<HitResult, int> results)
|
||||||
{
|
{
|
||||||
if (accuracy == accuracy_cutoff_x)
|
if (accuracy == accuracy_cutoff_x)
|
||||||
return ScoreRank.X;
|
return ScoreRank.X;
|
||||||
|
Loading…
Reference in New Issue
Block a user