mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:02:54 +08:00
remove incompatible system mods before enable preset
This commit is contained in:
parent
b35f2c99e6
commit
f9be9ed479
@ -55,7 +55,8 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
protected override void Select()
|
protected override void Select()
|
||||||
{
|
{
|
||||||
var selectedSystemMods = selectedMods.Value.Where(mod => mod.Type == ModType.System);
|
var selectedSystemMods = selectedMods.Value.Where(mod => mod.Type == ModType.System
|
||||||
|
&& !mod.IncompatibleMods.Any(t => Preset.Value.Mods.Any(m => m.GetType() == t)));
|
||||||
// will also have the side effect of activating the preset (see `updateActiveState()`).
|
// will also have the side effect of activating the preset (see `updateActiveState()`).
|
||||||
selectedMods.Value = Preset.Value.Mods.Concat(selectedSystemMods).ToArray();
|
selectedMods.Value = Preset.Value.Mods.Concat(selectedSystemMods).ToArray();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user