mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Maintain mod selection on ruleset change for common mods
This commit is contained in:
parent
3e5e717fce
commit
739b21ab3b
@ -586,11 +586,16 @@ namespace osu.Game
|
||||
return;
|
||||
}
|
||||
|
||||
var previouslySelectedMods = SelectedMods.Value.ToArray();
|
||||
|
||||
if (!SelectedMods.Disabled)
|
||||
SelectedMods.Value = Array.Empty<Mod>();
|
||||
|
||||
AvailableMods.Value = dict;
|
||||
|
||||
if (!SelectedMods.Disabled)
|
||||
SelectedMods.Value = previouslySelectedMods.Select(m => instance.CreateModFromAcronym(m.Acronym)).Where(m => m != null).ToArray();
|
||||
|
||||
void revertRulesetChange() => Ruleset.Value = r.OldValue?.Available == true ? r.OldValue : RulesetStore.AvailableRulesets.First();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user