Add beatmap hash to MultiplayerRoomSettings

This commit is contained in:
smoogipoo 2020-12-17 21:47:57 +09:00
parent 7321e59c4b
commit c15bb6b928
1 changed files with 9 additions and 2 deletions

View File

@ -18,13 +18,20 @@ public class MultiplayerRoomSettings : IEquatable<MultiplayerRoomSettings>
public int RulesetID { get; set; }
public string BeatmapChecksum { get; set; } = string.Empty;
public string Name { get; set; } = "Unnamed room";
[NotNull]
public IEnumerable<APIMod> Mods { get; set; } = Enumerable.Empty<APIMod>();
public bool Equals(MultiplayerRoomSettings other) => BeatmapID == other.BeatmapID && Mods.SequenceEqual(other.Mods) && RulesetID == other.RulesetID && Name.Equals(other.Name, StringComparison.Ordinal);
public bool Equals(MultiplayerRoomSettings other)
=> BeatmapID == other.BeatmapID
&& BeatmapChecksum == other.BeatmapChecksum
&& Mods.SequenceEqual(other.Mods)
&& RulesetID == other.RulesetID
&& Name.Equals(other.Name, StringComparison.Ordinal);
public override string ToString() => $"Name:{Name} Beatmap:{BeatmapID} Mods:{string.Join(',', Mods)} Ruleset:{RulesetID}";
public override string ToString() => $"Name:{Name} Beatmap:{BeatmapID} ({BeatmapChecksum}) Mods:{string.Join(',', Mods)} Ruleset:{RulesetID}";
}
}