mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Consider OnlineID
s during ruleset equality if available
Required for `APIBeatmap`s, which provide `Ruleset` instances with `OnlineID` available only. Also consistent with the comparer implementation.
This commit is contained in:
@ -44,6 +44,9 @@ namespace osu.Game.Rulesets
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
if (other == null) return false;
|
||||
|
||||
if (OnlineID >= 0 && other.OnlineID >= 0)
|
||||
return OnlineID == other.OnlineID;
|
||||
|
||||
return ShortName == other.ShortName;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user