Remove lobby preload (#15670)

This commit is contained in:
metalgearsloth
2023-04-23 13:14:25 +10:00
committed by GitHub
parent 34ea3599a0
commit 1bab97a534
4 changed files with 6 additions and 9 deletions

View File

@@ -34,7 +34,6 @@ namespace Content.Client.GameTicking.Managers
[ViewVariables] public bool DisallowedLateJoin { get; private set; } [ViewVariables] public bool DisallowedLateJoin { get; private set; }
[ViewVariables] public string? ServerInfoBlob { get; private set; } [ViewVariables] public string? ServerInfoBlob { get; private set; }
[ViewVariables] public TimeSpan StartTime { get; private set; } [ViewVariables] public TimeSpan StartTime { get; private set; }
[ViewVariables] public TimeSpan PreloadTime { get; private set; }
[ViewVariables] public TimeSpan RoundStartTimeSpan { get; private set; } [ViewVariables] public TimeSpan RoundStartTimeSpan { get; private set; }
[ViewVariables] public new bool Paused { get; private set; } [ViewVariables] public new bool Paused { get; private set; }
@@ -90,7 +89,6 @@ namespace Content.Client.GameTicking.Managers
private void LobbyStatus(TickerLobbyStatusEvent message) private void LobbyStatus(TickerLobbyStatusEvent message)
{ {
StartTime = message.StartTime; StartTime = message.StartTime;
PreloadTime = message.PreloadTime;
RoundStartTimeSpan = message.RoundStartTimeSpan; RoundStartTimeSpan = message.RoundStartTimeSpan;
IsGameStarted = message.IsRoundStarted; IsGameStarted = message.IsRoundStarted;
AreWeReady = message.YouAreReady; AreWeReady = message.YouAreReady;

View File

@@ -136,15 +136,17 @@ namespace Content.Client.Lobby
return; return;
} }
_lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-not-started");
string text; string text;
if (_gameTicker.Paused) if (_gameTicker.Paused)
{ {
text = Loc.GetString("lobby-state-paused"); text = Loc.GetString("lobby-state-paused");
} }
else if ((_gameTicker.StartTime - _gameTicker.PreloadTime) < _gameTiming.CurTime) else if (_gameTicker.StartTime < _gameTiming.CurTime)
{ {
text = Loc.GetString("lobby-state-preloading"); _lobby!.StartTime.Text = Loc.GetString("lobby-state-soon");
return;
} }
else else
{ {
@@ -160,7 +162,6 @@ namespace Content.Client.Lobby
} }
} }
_lobby!.StationTime.Text = Loc.GetString("lobby-state-player-status-round-not-started");
_lobby!.StartTime.Text = Loc.GetString("lobby-state-round-start-countdown-text", ("timeLeft", text)); _lobby!.StartTime.Text = Loc.GetString("lobby-state-round-start-countdown-text", ("timeLeft", text));
} }

View File

@@ -45,7 +45,6 @@ namespace Content.Shared.GameTicking
public bool YouAreReady { get; } public bool YouAreReady { get; }
// UTC. // UTC.
public TimeSpan StartTime { get; } public TimeSpan StartTime { get; }
public TimeSpan PreloadTime { get; }
public TimeSpan RoundStartTimeSpan { get; } public TimeSpan RoundStartTimeSpan { get; }
public bool Paused { get; } public bool Paused { get; }
@@ -56,7 +55,6 @@ namespace Content.Shared.GameTicking
LobbyBackground = lobbyBackground; LobbyBackground = lobbyBackground;
YouAreReady = youAreReady; YouAreReady = youAreReady;
StartTime = startTime; StartTime = startTime;
PreloadTime = preloadTime;
RoundStartTimeSpan = roundStartTimeSpan; RoundStartTimeSpan = roundStartTimeSpan;
Paused = paused; Paused = paused;
} }

View File

@@ -1,8 +1,8 @@
lobby-state-paused = Paused lobby-state-paused = Paused
lobby-state-preloading = Soon lobby-state-soon = Round starting soon
lobby-state-right-now-question = Right Now? lobby-state-right-now-question = Right Now?
lobby-state-right-now-confirmation = Right Now lobby-state-right-now-confirmation = Right Now
lobby-state-round-start-countdown-text = Round Starts In: {$timeLeft} lobby-state-round-start-countdown-text = Round starts In: {$timeLeft}
lobby-state-ready-button-join-state = Join lobby-state-ready-button-join-state = Join
lobby-state-ready-button-ready-up-state = Ready Up lobby-state-ready-button-ready-up-state = Ready Up
lobby-state-player-status-not-ready = Not Ready lobby-state-player-status-not-ready = Not Ready