From f9be9ed479555a355be8bc3673540ce312fbf39e Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sat, 4 May 2024 18:44:47 +0800 Subject: [PATCH] remove incompatible system mods before enable preset --- osu.Game/Overlays/Mods/ModPresetPanel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/Mods/ModPresetPanel.cs b/osu.Game/Overlays/Mods/ModPresetPanel.cs index 3982abeba7..ca7e64957f 100644 --- a/osu.Game/Overlays/Mods/ModPresetPanel.cs +++ b/osu.Game/Overlays/Mods/ModPresetPanel.cs @@ -55,7 +55,8 @@ namespace osu.Game.Overlays.Mods 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()`). selectedMods.Value = Preset.Value.Mods.Concat(selectedSystemMods).ToArray(); }