mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 16:57:25 +08:00
31 lines
1011 B
C#
31 lines
1011 B
C#
// 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.
|
|
|
|
#nullable enable
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using JetBrains.Annotations;
|
|
using osu.Game.Online.API;
|
|
|
|
namespace osu.Game.Online.RealtimeMultiplayer
|
|
{
|
|
[Serializable]
|
|
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>();
|
|
|
|
public bool Equals(MultiplayerRoomSettings other) => BeatmapID == other.BeatmapID && Mods.SequenceEqual(other.Mods) && RulesetID == other.RulesetID;
|
|
|
|
public override string ToString() => $"Beatmap:{BeatmapID} Mods:{string.Join(',', Mods)} Ruleset:{RulesetID}";
|
|
|
|
public static MultiplayerRoomSettings Empty() => new MultiplayerRoomSettings();
|
|
}
|
|
}
|