1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-14 16:23:14 +08:00

Replace MatchmakingSettings with MatchmakingPool

This commit is contained in:
Dan Balasescu
2025-09-05 14:33:28 +09:00
Unverified
parent 0027b9846d
commit 32576ff249
2 changed files with 15 additions and 7 deletions
@@ -20,7 +20,7 @@ namespace osu.Game.Online.Matchmaking
/// <summary>
/// Joins the matchmaking queue, allowing the local user to get matched up with others.
/// </summary>
Task MatchmakingJoinQueue(MatchmakingSettings settings);
Task MatchmakingJoinQueue(int poolId);
/// <summary>
/// Leaves the matchmaking queue.
@@ -9,23 +9,31 @@ namespace osu.Game.Online.Matchmaking
{
[MessagePackObject]
[Serializable]
public class MatchmakingSettings : IEquatable<MatchmakingSettings>
public class MatchmakingPool : IEquatable<MatchmakingPool>
{
[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);
}
}