mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 18:32:55 +08:00
Rename start countdown request
This commit is contained in:
parent
72843a6797
commit
04f4e81852
@ -117,7 +117,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
MultiplayerClient.TransferHost(2);
|
||||
});
|
||||
|
||||
AddStep("start with countdown", () => MultiplayerClient.SendMatchRequest(new MatchStartCountdownRequest { Delay = TimeSpan.FromMinutes(2) }));
|
||||
AddStep("start with countdown", () => MultiplayerClient.SendMatchRequest(new StartMatchCountdownRequest { Delay = TimeSpan.FromMinutes(2) }));
|
||||
|
||||
ClickButtonWhenEnabled<MultiplayerReadyButton.ReadyButton>();
|
||||
AddUntilStep("user is ready", () => MultiplayerClient.Room?.Users[0].State == MultiplayerUserState.Ready);
|
||||
@ -193,7 +193,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
MultiplayerClient.TransferHost(2);
|
||||
});
|
||||
|
||||
AddStep("start countdown", () => MultiplayerClient.SendMatchRequest(new MatchStartCountdownRequest { Delay = TimeSpan.FromMinutes(1) }));
|
||||
AddStep("start countdown", () => MultiplayerClient.SendMatchRequest(new StartMatchCountdownRequest { Delay = TimeSpan.FromMinutes(1) }));
|
||||
AddUntilStep("countdown started", () => MultiplayerClient.Room?.Countdown != null);
|
||||
|
||||
AddStep("transfer host to local user", () => MultiplayerClient.TransferHost(API.LocalUser.Value.OnlineID));
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Online.Multiplayer.Countdown
|
||||
/// A request for a countdown to start the match.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class MatchStartCountdownRequest : MatchUserRequest
|
||||
public class StartMatchCountdownRequest : MatchUserRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// How long the countdown should last.
|
@ -15,7 +15,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
[MessagePackObject]
|
||||
// IMPORTANT: Add rules to SignalRUnionWorkaroundResolver for new derived types.
|
||||
[Union(0, typeof(ChangeTeamRequest))]
|
||||
[Union(1, typeof(MatchStartCountdownRequest))]
|
||||
[Union(1, typeof(StartMatchCountdownRequest))]
|
||||
[Union(2, typeof(StopCountdownRequest))]
|
||||
public abstract class MatchUserRequest
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Online
|
||||
internal static readonly IReadOnlyList<(Type derivedType, Type baseType)> BASE_TYPE_MAPPING = new[]
|
||||
{
|
||||
(typeof(ChangeTeamRequest), typeof(MatchUserRequest)),
|
||||
(typeof(MatchStartCountdownRequest), typeof(MatchUserRequest)),
|
||||
(typeof(StartMatchCountdownRequest), typeof(MatchUserRequest)),
|
||||
(typeof(StopCountdownRequest), typeof(MatchUserRequest)),
|
||||
(typeof(CountdownChangedEvent), typeof(MatchServerEvent)),
|
||||
(typeof(TeamVersusRoomState), typeof(MatchRoomState)),
|
||||
|
@ -161,7 +161,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
||||
Debug.Assert(clickOperation == null);
|
||||
clickOperation = ongoingOperationTracker.BeginOperation();
|
||||
|
||||
Client.SendMatchRequest(new MatchStartCountdownRequest { Delay = duration }).ContinueWith(_ => endOperation());
|
||||
Client.SendMatchRequest(new StartMatchCountdownRequest { Delay = duration }).ContinueWith(_ => endOperation());
|
||||
}
|
||||
|
||||
private void endOperation()
|
||||
|
@ -309,7 +309,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
|
||||
switch (request)
|
||||
{
|
||||
case MatchStartCountdownRequest matchCountdownRequest:
|
||||
case StartMatchCountdownRequest matchCountdownRequest:
|
||||
countdownStopSource?.Cancel();
|
||||
|
||||
var stopSource = countdownStopSource = new CancellationTokenSource();
|
||||
|
Loading…
Reference in New Issue
Block a user