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:
@@ -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.
|
||||
|
||||
+14
-6
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user