1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:55:37 +08:00

Fix incompatibility panel using reference equality

This commit is contained in:
Bartłomiej Dach 2022-04-17 21:20:16 +02:00
parent ffb5c1e86c
commit 8af865a1c5
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -37,7 +37,9 @@ namespace osu.Game.Overlays.Mods
private void updateIncompatibility()
{
incompatible.Value = selectedMods.Value.Count > 0 && !selectedMods.Value.Contains(Mod) && !ModUtils.CheckCompatibleSet(selectedMods.Value.Append(Mod));
incompatible.Value = selectedMods.Value.Count > 0
&& selectedMods.Value.All(selected => selected.GetType() != Mod.GetType())
&& !ModUtils.CheckCompatibleSet(selectedMods.Value.Append(Mod));
}
protected override void UpdateState()