mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00:00
Small clean up
This commit is contained in:
parent
82b07d19f8
commit
e321536acc
@ -626,17 +626,12 @@ namespace osu.Game
|
||||
return;
|
||||
}
|
||||
|
||||
//DeepCloning collection, because emptying SelectedMods resets all SettingSources Bindables to their default value
|
||||
var previouslySelectedMods = SelectedMods.Value.Select(mod => mod.DeepClone()).ToArray();
|
||||
|
||||
if (!SelectedMods.Disabled)
|
||||
SelectedMods.Value = Array.Empty<Mod>();
|
||||
|
||||
AvailableMods.Value = dict;
|
||||
|
||||
if (!SelectedMods.Disabled)
|
||||
{
|
||||
SelectedMods.Value = previouslySelectedMods.Select(oldMod =>
|
||||
//converting mods from one ruleset to the other, while also keeping their shared settings unchanged
|
||||
SelectedMods.Value = SelectedMods.Value.Select(oldMod =>
|
||||
{
|
||||
Mod newMod = instance.CreateModFromAcronym(oldMod.Acronym);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user