From 32576ff2498c255fb5e6e2cb14fe10ff1dfa00a2 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Fri, 5 Sep 2025 14:33:28 +0900 Subject: [PATCH] Replace MatchmakingSettings with MatchmakingPool --- .../Online/Matchmaking/IMatchmakingServer.cs | 2 +- ...chmakingSettings.cs => MatchmakingPool.cs} | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) rename osu.Game/Online/Matchmaking/{MatchmakingSettings.cs => MatchmakingPool.cs} (55%) diff --git a/osu.Game/Online/Matchmaking/IMatchmakingServer.cs b/osu.Game/Online/Matchmaking/IMatchmakingServer.cs index 6bfd340b8c..aef18371e3 100644 --- a/osu.Game/Online/Matchmaking/IMatchmakingServer.cs +++ b/osu.Game/Online/Matchmaking/IMatchmakingServer.cs @@ -20,7 +20,7 @@ namespace osu.Game.Online.Matchmaking /// /// Joins the matchmaking queue, allowing the local user to get matched up with others. /// - Task MatchmakingJoinQueue(MatchmakingSettings settings); + Task MatchmakingJoinQueue(int poolId); /// /// Leaves the matchmaking queue. diff --git a/osu.Game/Online/Matchmaking/MatchmakingSettings.cs b/osu.Game/Online/Matchmaking/MatchmakingPool.cs similarity index 55% rename from osu.Game/Online/Matchmaking/MatchmakingSettings.cs rename to osu.Game/Online/Matchmaking/MatchmakingPool.cs index c1a10e97ad..3f256d5251 100644 --- a/osu.Game/Online/Matchmaking/MatchmakingSettings.cs +++ b/osu.Game/Online/Matchmaking/MatchmakingPool.cs @@ -9,23 +9,31 @@ namespace osu.Game.Online.Matchmaking { [MessagePackObject] [Serializable] - public class MatchmakingSettings : IEquatable + public class MatchmakingPool : IEquatable { [Key(0)] - public int RulesetId { get; set; } + public int Id { get; set; } [Key(1)] + public int RulesetId { get; set; } + + [Key(2)] public int Variant { get; set; } - public bool Equals(MatchmakingSettings? other) + [Key(3)] + public string Name { get; set; } = string.Empty; + + public bool Equals(MatchmakingPool? other) => other != null + && Id == other.Id && RulesetId == other.RulesetId - && Variant == other.Variant; + && Variant == other.Variant + && Name == other.Name; public override bool Equals(object? obj) - => obj is MatchmakingSettings other && Equals(other); + => obj is MatchmakingPool other && Equals(other); [SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")] - public override int GetHashCode() => HashCode.Combine(RulesetId, Variant); + public override int GetHashCode() => HashCode.Combine(Id, RulesetId, Variant, Name); } }