From 08f129b4c885c2e98402b7445e4b1b8094717e42 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 17 Nov 2021 20:09:30 +0900 Subject: [PATCH 1/2] Expose LegacyScoreDecoder.CalculateAccuracy() --- osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs b/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs index 7bfe0308f7..100ef121a8 100644 --- a/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs +++ b/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs @@ -124,7 +124,7 @@ namespace osu.Game.Scoring.Legacy return score; } - protected void CalculateAccuracy(ScoreInfo score) + public static void CalculateAccuracy(ScoreInfo score) { int countMiss = score.GetCountMiss() ?? 0; int count50 = score.GetCount50() ?? 0; From 9182eab48651f4ec41eeb8dc214f4bb11858e782 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 17 Nov 2021 20:45:48 +0900 Subject: [PATCH 2/2] Rename method + xmldoc --- osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs b/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs index 100ef121a8..7ac4f90c07 100644 --- a/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs +++ b/osu.Game/Scoring/Legacy/LegacyScoreDecoder.cs @@ -115,7 +115,7 @@ namespace osu.Game.Scoring.Legacy } } - CalculateAccuracy(score.ScoreInfo); + PopulateAccuracy(score.ScoreInfo); // before returning for database import, we must restore the database-sourced BeatmapInfo. // if not, the clone operation in GetPlayableBeatmap will cause a dereference and subsequent database exception. @@ -124,7 +124,14 @@ namespace osu.Game.Scoring.Legacy return score; } - public static void CalculateAccuracy(ScoreInfo score) + /// + /// Populates the accuracy of a given from its contained statistics. + /// + /// + /// Legacy use only. + /// + /// The to populate. + public static void PopulateAccuracy(ScoreInfo score) { int countMiss = score.GetCountMiss() ?? 0; int count50 = score.GetCount50() ?? 0;