diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index 8e69ffa0a0..5712d9c94a 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.Contracts; using System.Linq; using osu.Framework.Bindables; using osu.Framework.Utils; @@ -283,6 +284,7 @@ namespace osu.Game.Rulesets.Scoring /// The to represent the score as. /// The to compute the total score of. /// The total score in the given . + [Pure] public double ComputeFinalScore(ScoringMode mode, ScoreInfo scoreInfo) { if (!ruleset.RulesetInfo.Equals(scoreInfo.Ruleset)) @@ -303,6 +305,7 @@ namespace osu.Game.Rulesets.Scoring /// The to represent the score as. /// The to compute the total score of. /// The total score in the given . + [Pure] public double ComputePartialScore(ScoringMode mode, ScoreInfo scoreInfo) { if (!ruleset.RulesetInfo.Equals(scoreInfo.Ruleset)) @@ -328,6 +331,7 @@ namespace osu.Game.Rulesets.Scoring /// The to compute the total score of. /// The maximum achievable combo for the provided beatmap. /// The total score in the given . + [Pure] public double ComputeFinalLegacyScore(ScoringMode mode, ScoreInfo scoreInfo, int maxAchievableCombo) { if (!ruleset.RulesetInfo.Equals(scoreInfo.Ruleset)) @@ -354,6 +358,7 @@ namespace osu.Game.Rulesets.Scoring /// The current scoring values. /// The maximum scoring values. /// The total score computed from the given scoring values. + [Pure] public double ComputeScore(ScoringMode mode, ScoringValues current, ScoringValues maximum) { double accuracyRatio = maximum.BaseScore > 0 ? current.BaseScore / maximum.BaseScore : 1; @@ -370,6 +375,7 @@ namespace osu.Game.Rulesets.Scoring /// The total bonus score. /// The total number of basic (non-tick and non-bonus) hitobjects in the beatmap. /// The total score computed from the given scoring component ratios. + [Pure] public double ComputeScore(ScoringMode mode, double accuracyRatio, double comboRatio, double bonusScore, int totalBasicHitObjects) { switch (mode) @@ -492,7 +498,8 @@ namespace osu.Game.Rulesets.Scoring /// The score to extract scoring values from. /// The "current" scoring values, representing the hit statistics as they appear. /// The "maximum" scoring values, representing the hit statistics as if the maximum hit result was attained each time. - public void ExtractScoringValues(ScoreInfo scoreInfo, out ScoringValues current, out ScoringValues maximum) + [Pure] + internal void ExtractScoringValues(ScoreInfo scoreInfo, out ScoringValues current, out ScoringValues maximum) { extractScoringValues(scoreInfo.Statistics, out current, out maximum); current.MaxCombo = scoreInfo.MaxCombo; @@ -516,7 +523,8 @@ namespace osu.Game.Rulesets.Scoring /// The replay frame header to extract scoring values from. /// The "current" scoring values, representing the hit statistics as they appear. /// The "maximum" scoring values, representing the hit statistics as if the maximum hit result was attained each time. - public void ExtractScoringValues(FrameHeader header, out ScoringValues current, out ScoringValues maximum) + [Pure] + internal void ExtractScoringValues(FrameHeader header, out ScoringValues current, out ScoringValues maximum) { extractScoringValues(header.Statistics, out current, out maximum); current.MaxCombo = header.MaxCombo; @@ -537,6 +545,7 @@ namespace osu.Game.Rulesets.Scoring /// The hit statistics to extract scoring values from. /// The "current" scoring values, representing the hit statistics as they appear. /// The "maximum" scoring values, representing the hit statistics as if the maximum hit result was attained each time. + [Pure] private void extractScoringValues(IReadOnlyDictionary statistics, out ScoringValues current, out ScoringValues maximum) { current = default;