mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08:00
Added safety measures for invalid mod combinations
This commit is contained in:
parent
0841e73a39
commit
8e297dc60a
@ -641,6 +641,16 @@ namespace osu.Game
|
|||||||
convertedCommonMods.Add(convertedMod);
|
convertedCommonMods.Add(convertedMod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ModUtils.CheckValidForGameplay(convertedCommonMods, out var invalid))
|
||||||
|
{
|
||||||
|
invalid.ForEach(mod =>
|
||||||
|
{
|
||||||
|
int index = convertedCommonMods.IndexOf(mod);
|
||||||
|
convertedCommonMods.RemoveAt(index);
|
||||||
|
previouslySelectedCommonMods.RemoveAt(index);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!SelectedMods.Disabled)
|
if (!SelectedMods.Disabled)
|
||||||
// Select common mods to play the deselect samples for other mods
|
// Select common mods to play the deselect samples for other mods
|
||||||
SelectedMods.Value = previouslySelectedCommonMods;
|
SelectedMods.Value = previouslySelectedCommonMods;
|
||||||
|
Loading…
Reference in New Issue
Block a user