Don't use Mods enum for handling incompatible mods.

This commit is contained in:
Dean Herbert
2017-03-06 18:16:21 +09:00
parent a7d7abe70e
commit 45f500920c
7 changed files with 46 additions and 35 deletions

View File

@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Mods
}
}
public void DeselectMod(Modes.Mods modName)
public void DeselectType(Type modType)
{
foreach (ModSection section in modSectionsContainer.Children)
{
@ -132,7 +132,7 @@ namespace osu.Game.Overlays.Mods
{
foreach (Mod mod in button.Mods)
{
if (mod.Name == modName)
if (modType.IsInstanceOfType(mod))
{
button.Deselect();
return;
@ -146,10 +146,8 @@ namespace osu.Game.Overlays.Mods
{
if (selectedMod != null)
{
foreach (Modes.Mods disableMod in selectedMod.DisablesMods)
{
DeselectMod(disableMod);
}
foreach (Type t in selectedMod.IncompatibleMods)
DeselectType(t);
}
refreshSelectedMods();