2020-12-08 13:33:38 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2020-12-08 15:15:51 +08:00
|
|
|
#nullable enable
|
|
|
|
|
2020-12-08 13:33:38 +08:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
using osu.Game.Online.API;
|
|
|
|
|
|
|
|
namespace osu.Game.Online.RealtimeMultiplayer
|
|
|
|
{
|
2020-12-08 15:15:51 +08:00
|
|
|
[Serializable]
|
2020-12-08 13:33:38 +08:00
|
|
|
public class MultiplayerRoomSettings : IEquatable<MultiplayerRoomSettings>
|
|
|
|
{
|
|
|
|
public int? BeatmapID { get; set; }
|
|
|
|
|
|
|
|
public int? RulesetID { get; set; }
|
|
|
|
|
|
|
|
[NotNull]
|
|
|
|
public IEnumerable<APIMod> Mods { get; set; } = Enumerable.Empty<APIMod>();
|
|
|
|
|
2020-12-08 15:15:51 +08:00
|
|
|
public bool Equals(MultiplayerRoomSettings other) => BeatmapID == other.BeatmapID && Mods.SequenceEqual(other.Mods) && RulesetID == other.RulesetID;
|
2020-12-08 13:33:38 +08:00
|
|
|
|
|
|
|
public override string ToString() => $"Beatmap:{BeatmapID} Mods:{string.Join(',', Mods)} Ruleset:{RulesetID}";
|
|
|
|
}
|
|
|
|
}
|