Subclass LocalPlayerModSelectOverlay to correctly deselect incompatible mods on free mod selection

This commit is contained in:
Dean Herbert
2021-02-05 16:42:35 +09:00
parent 2fc3a97f56
commit 3e750feaa4
6 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1,18 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Mods;
namespace osu.Game.Overlays.Mods
{
public class LocalPlayerModSelectOverlay : ModSelectOverlay
{
protected override void OnModSelected(Mod mod)
{
base.OnModSelected(mod);
foreach (var section in ModSectionsContainer.Children)
section.DeselectTypes(mod.IncompatibleMods, true);
}
}
}