Add back interface equality but limit to only matching types

This commit is contained in:
Dean Herbert
2021-11-16 12:25:37 +09:00
parent 1988b263c6
commit 9207b87b76
8 changed files with 15 additions and 2 deletions

View File

@ -163,6 +163,8 @@ namespace osu.Game.Beatmaps
return false;
}
public bool Equals(IBeatmapInfo other) => other is BeatmapInfo b && Equals(b);
public bool AudioEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
BeatmapSet.Hash == other.BeatmapSet.Hash &&
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;