Fix mod using reference equality unless casted to IMod

This commit is contained in:
Salman Ahmed
2020-12-27 02:42:13 +03:00
parent 6849eabf2c
commit 43f8f3638a
4 changed files with 7 additions and 8 deletions

View File

@ -13,7 +13,7 @@ using osu.Game.Rulesets.Mods;
namespace osu.Game.Online.API
{
public class APIMod : IMod
public class APIMod : IMod, IEquatable<APIMod>
{
[JsonProperty("acronym")]
public string Acronym { get; set; }
@ -52,7 +52,7 @@ namespace osu.Game.Online.API
return resultMod;
}
public bool Equals(IMod other) => Acronym == other?.Acronym;
public bool Equals(APIMod other) => Acronym == other?.Acronym;
public override string ToString()
{