mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 05:47:50 +08:00
Rename completed state to passed
This commit is contained in:
parent
0d99017178
commit
4c76027178
@ -247,7 +247,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCompletionState()
|
||||
public void TestPassedState()
|
||||
{
|
||||
loadSpectatingScreen();
|
||||
|
||||
@ -255,8 +255,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
sendFrames();
|
||||
waitForPlayer();
|
||||
|
||||
AddStep("send completion", () => spectatorClient.EndPlay(streamingUser.Id, SpectatingUserState.Completed));
|
||||
AddUntilStep("state is completed", () => spectatorClient.WatchingUserStates[streamingUser.Id].State == SpectatingUserState.Completed);
|
||||
AddStep("send passed", () => spectatorClient.EndPlay(streamingUser.Id, SpectatingUserState.Passed));
|
||||
AddUntilStep("state is passed", () => spectatorClient.WatchingUserStates[streamingUser.Id].State == SpectatingUserState.Passed);
|
||||
|
||||
start();
|
||||
sendFrames();
|
||||
|
@ -6,7 +6,7 @@ namespace osu.Game.Online.Spectator
|
||||
public enum SpectatingUserState
|
||||
{
|
||||
/// <summary>
|
||||
/// The spectated user has not yet played.
|
||||
/// The spectated user is not yet playing.
|
||||
/// </summary>
|
||||
Idle,
|
||||
|
||||
@ -16,17 +16,17 @@ namespace osu.Game.Online.Spectator
|
||||
Playing,
|
||||
|
||||
/// <summary>
|
||||
/// The spectated user has successfully completed gameplay.
|
||||
/// The spectated user has passed gameplay.
|
||||
/// </summary>
|
||||
Completed,
|
||||
Passed,
|
||||
|
||||
/// <summary>
|
||||
/// The spectator user has failed during gameplay.
|
||||
/// The spectator user has failed gameplay.
|
||||
/// </summary>
|
||||
Failed,
|
||||
|
||||
/// <summary>
|
||||
/// The spectated user has quit during gameplay.
|
||||
/// The spectated user has quit gameplay.
|
||||
/// </summary>
|
||||
Quit
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ namespace osu.Game.Online.Spectator
|
||||
currentBeatmap = null;
|
||||
|
||||
if (state.HasPassed)
|
||||
currentState.State = SpectatingUserState.Completed;
|
||||
currentState.State = SpectatingUserState.Passed;
|
||||
else if (state.HasFailed)
|
||||
currentState.State = SpectatingUserState.Failed;
|
||||
else
|
||||
|
@ -216,7 +216,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
|
||||
protected override void EndGameplay(int userId, SpectatorState state)
|
||||
{
|
||||
if (state.State == SpectatingUserState.Completed || state.State == SpectatingUserState.Failed)
|
||||
if (state.State == SpectatingUserState.Passed || state.State == SpectatingUserState.Failed)
|
||||
return;
|
||||
|
||||
RemoveUser(userId);
|
||||
|
@ -134,7 +134,7 @@ namespace osu.Game.Screens.Spectate
|
||||
|
||||
switch (newState.State)
|
||||
{
|
||||
case SpectatingUserState.Completed:
|
||||
case SpectatingUserState.Passed:
|
||||
// Make sure that gameplay completes to the end.
|
||||
if (gameplayStates.TryGetValue(userId, out var gameplayState))
|
||||
gameplayState.Score.Replay.HasReceivedAllFrames = true;
|
||||
|
Loading…
Reference in New Issue
Block a user