1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 08:30:00 +08:00
Files
osu-lazer/osu.Game/Online/Matchmaking/IMatchmakingClient.cs
T
Dan Balasescu a3b8b9aee9 Implement duels for ranked play (#37556)
I've seen this suggested quite a bit and is a pretty easy implementation
all things considered.

For now, while on the queue screen, you can open up the dashboard
overlay and select another player to duel. This will bring you into an
unranked lobby.


https://github.com/user-attachments/assets/712897a9-9350-4741-899d-59662c722e43
2026-04-29 16:12:27 +09:00

77 lines
3.3 KiB
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.
using System;
using System.Threading.Tasks;
namespace osu.Game.Online.Matchmaking
{
public interface IMatchmakingClient : IStatefulUserHubClient
{
/// <summary>
/// Signals that the local user was placed in the matchmaking queue.
/// </summary>
Task MatchmakingQueueJoined();
/// <summary>
/// Signals that the local user was removed from the matchmaking queue.
/// </summary>
Task MatchmakingQueueLeft();
/// <summary>
/// Signals that a match has been found and the local user is invited to it.
/// The invitation may be <see cref="IMatchmakingServer.MatchmakingAcceptInvitation">accepted</see>,
/// <see cref="IMatchmakingServer.MatchmakingDeclineInvitation">declined</see>,
/// or ignored - in which case it will automatically be declined after a short timeout period.
/// </summary>
/// <remarks>
/// Provided for compatibility with older clients - can be removed 20260825.
/// </remarks>
[Obsolete]
Task MatchmakingRoomInvited();
/// <summary>
/// Signals that a match has been found and the local user is invited to it.
/// The invitation may be <see cref="IMatchmakingServer.MatchmakingAcceptInvitation">accepted</see>,
/// <see cref="IMatchmakingServer.MatchmakingDeclineInvitation">declined</see>,
/// or ignored - in which case it will automatically be declined after a short timeout period.
/// </summary>
Task MatchmakingRoomInvitedWithParams(MatchmakingRoomInvitationParams invitation);
/// <summary>
/// Signals that the user has been issued a duel by another user.
/// </summary>
/// <param name="issue">Contains the parameters for the duel.</param>
Task MatchmakingDuelIssued(MatchmakingDuelIssuedParams issue);
/// <summary>
/// Signals that the matchmaking room is ready to be opened.
/// </summary>
Task MatchmakingRoomReady(long roomId, string password);
/// <summary>
/// The matchmaking lobby status has changed.
/// </summary>
Task MatchmakingLobbyStatusChanged(MatchmakingLobbyStatus status);
/// <summary>
/// The matchmaking status of the current user has changed.
/// </summary>
Task MatchmakingQueueStatusChanged(MatchmakingQueueStatus status);
/// <summary>
/// The user has raised a candidate playlist item to be played.
/// </summary>
/// <param name="userId">The notifying user.</param>
/// <param name="playlistItemId">The playlist item candidate raised, or -1 as a special value that indicates a random selection.</param>
Task MatchmakingItemSelected(int userId, long playlistItemId);
/// <summary>
/// The user has removed a candidate playlist item.
/// </summary>
/// <param name="userId">The notifying user.</param>
/// <param name="playlistItemId">The playlist item candidate removed, or -1 as a special value that indicates a random selection.</param>
Task MatchmakingItemDeselected(int userId, long playlistItemId);
}
}