From 2b16421461a17fef19d3aab3dd88aed577b12175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 27 May 2024 14:41:45 +0200 Subject: [PATCH] Fix `performance legacy-score` command doing things it doesn't need to I'm not exactly sure when or how this happened because I tested this previously (did some web change cause this?), but the `performance legacy-score` command is: - doubly-applying the classic mod - needlessly marking the score as legacy - incorrectly copying the post-conversion recalculated total score into `LegacyTotalScore` while all it needs to be doing is reading what it is given from the API. All of the data it needs is already there, in a form ready for consumption. --- .../Performance/LegacyScorePerformanceCommand.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/PerformanceCalculator/Performance/LegacyScorePerformanceCommand.cs b/PerformanceCalculator/Performance/LegacyScorePerformanceCommand.cs index 846a2839a..cc7213c9e 100644 --- a/PerformanceCalculator/Performance/LegacyScorePerformanceCommand.cs +++ b/PerformanceCalculator/Performance/LegacyScorePerformanceCommand.cs @@ -1,13 +1,11 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using System.Linq; using McMaster.Extensions.CommandLineUtils; using osu.Game.Beatmaps; using osu.Game.Database; using osu.Game.Online.API.Requests.Responses; using osu.Game.Rulesets; -using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Scoring.Legacy; using osu.Game.Scoring; using osu.Game.Scoring.Legacy; @@ -26,9 +24,6 @@ protected override ScoreInfo CreateScore(SoloScoreInfo apiScore, Ruleset ruleset { var score = base.CreateScore(apiScore, ruleset, apiBeatmap, workingBeatmap); - score.Mods = score.Mods.Append(ruleset.CreateMod()).ToArray(); - score.IsLegacyScore = true; - score.LegacyTotalScore = (int)score.TotalScore; LegacyScoreDecoder.PopulateMaximumStatistics(score, workingBeatmap); StandardisedScoreMigrationTools.UpdateFromLegacy( score,