mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +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);
|
||||
}
|
||||
|
||||
if (!ModUtils.CheckValidForGameplay(convertedCommonMods, out var invalid))
|
||||
{
|
||||
invalid.ForEach(mod =>
|
||||
{
|
||||
int index = convertedCommonMods.IndexOf(mod);
|
||||
convertedCommonMods.RemoveAt(index);
|
||||
previouslySelectedCommonMods.RemoveAt(index);
|
||||
});
|
||||
}
|
||||
|
||||
if (!SelectedMods.Disabled)
|
||||
// Select common mods to play the deselect samples for other mods
|
||||
SelectedMods.Value = previouslySelectedCommonMods;
|
||||
|
Loading…
Reference in New Issue
Block a user