From 31075c993ed7aae88ce0c9a85416ae95119fc5f7 Mon Sep 17 00:00:00 2001 From: tsunyoku Date: Fri, 16 May 2025 12:28:56 +0100 Subject: [PATCH] Pass `LegacyTotalScore` on simulate screen --- PerformanceCalculatorGUI/Screens/SimulateScreen.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PerformanceCalculatorGUI/Screens/SimulateScreen.cs b/PerformanceCalculatorGUI/Screens/SimulateScreen.cs index 7dcf15c..f3e8f3b 100644 --- a/PerformanceCalculatorGUI/Screens/SimulateScreen.cs +++ b/PerformanceCalculatorGUI/Screens/SimulateScreen.cs @@ -733,7 +733,8 @@ namespace PerformanceCalculatorGUI.Screens Statistics = statistics, Mods = appliedMods.Value.ToArray(), TotalScore = score, - Ruleset = ruleset.Value + Ruleset = ruleset.Value, + LegacyTotalScore = legacyTotalScore, }, difficultyAttributes); performanceAttributesContainer.Attributes.Value = AttributeConversion.ToDictionary(ppAttributes); @@ -985,6 +986,8 @@ namespace PerformanceCalculatorGUI.Screens notificationDisplay.Display(new Notification(message)); } + private long? legacyTotalScore; + private void populateSettingsFromScore(long scoreId) { if (scoreIdPopulateButton.State.Value == ButtonState.Loading) @@ -1009,6 +1012,8 @@ namespace PerformanceCalculatorGUI.Screens ruleset.Value = rulesets.GetRuleset(scoreInfo.RulesetID); appliedMods.Value = scoreInfo.Mods.Select(x => x.ToMod(ruleset.Value.CreateInstance())).ToList(); + legacyTotalScore = scoreInfo.LegacyTotalScore; + fullScoreDataSwitch.Current.Value = true; // TODO: this shouldn't be done in 2 lines