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