Fix IMod now using reference equality as well

This commit is contained in:
Salman Ahmed
2020-12-28 15:19:28 +03:00
parent 43f8f3638a
commit 5efcdbd431
4 changed files with 8 additions and 4 deletions

View File

@ -149,6 +149,7 @@ namespace osu.Game.Rulesets.Mods
return copy;
}
public bool Equals(Mod other) => GetType() == other?.GetType();
public bool Equals(IMod other) => other is Mod them && Equals(them);
public bool Equals(Mod other) => Acronym == other?.Acronym;
}
}