mirror of
https://github.com/ppy/osu
synced 2025-01-05 13:50:03 +00:00
Small clean up
This commit is contained in:
parent
82b07d19f8
commit
e321536acc
@ -626,17 +626,12 @@ namespace osu.Game
|
|||||||
return;
|
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;
|
AvailableMods.Value = dict;
|
||||||
|
|
||||||
if (!SelectedMods.Disabled)
|
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);
|
Mod newMod = instance.CreateModFromAcronym(oldMod.Acronym);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user