1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-07 23:07:01 +09:00

Merge pull request #265 from tsunyoku/legacy-total-score-simulate-screen

Pass `LegacyTotalScore` on simulate screen
This commit is contained in:
James Wilson 2025-05-16 12:38:30 +01:00 committed by GitHub
commit 6f4c6d352d
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -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);
@ -894,7 +895,10 @@ namespace PerformanceCalculatorGUI.Screens
private void resetCalculations()
{
createCalculators();
resetMods();
legacyTotalScore = null;
calculateDifficulty();
calculatePerformance();
populateScoreParams();
@ -985,6 +989,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 +1015,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