1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:18:22 +08:00

Merge branch 'master' into tournament-fix-save-changes-on-population

This commit is contained in:
Bartłomiej Dach 2023-01-17 18:49:08 +01:00 committed by GitHub
commit 7dbbb7caa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -113,7 +113,7 @@ namespace osu.Game.Tournament.Screens.Setup
new LabelledDropdown<RulesetInfo>
{
Label = "Ruleset",
Description = "Decides what stats are displayed and which ranks are retrieved for players.",
Description = "Decides what stats are displayed and which ranks are retrieved for players. This requires a restart to reload data for an existing bracket.",
Items = rulesets.AvailableRulesets,
Current = LadderInfo.Ruleset,
},

View File

@ -159,6 +159,18 @@ namespace osu.Game.Tournament
saveChanges();
ladder.CurrentMatch.Value = ladder.Matches.FirstOrDefault(p => p.Current.Value);
ladder.Ruleset.BindValueChanged(r =>
{
// Refetch player rank data on next startup as the ruleset has changed.
foreach (var team in ladder.Teams)
{
foreach (var player in team.Players)
player.Rank = null;
}
SaveChanges();
});
}
catch (Exception e)
{