Refactor lobby status (#10550)
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Content.Client.GameTicking.Managers
|
||||
[ViewVariables] public TimeSpan StartTime { get; private set; }
|
||||
[ViewVariables] public TimeSpan RoundStartTimeSpan { get; private set; }
|
||||
[ViewVariables] public new bool Paused { get; private set; }
|
||||
[ViewVariables] public Dictionary<NetUserId, LobbyPlayerStatus> Status { get; private set; } = new();
|
||||
|
||||
[ViewVariables] public IReadOnlyDictionary<EntityUid, Dictionary<string, uint?>> JobsAvailable => _jobsAvailable;
|
||||
[ViewVariables] public IReadOnlyDictionary<EntityUid, string> StationNames => _stationNames;
|
||||
|
||||
@@ -66,7 +66,6 @@ namespace Content.Client.GameTicking.Managers
|
||||
SubscribeNetworkEvent<TickerJobsAvailableEvent>(UpdateJobsAvailable);
|
||||
SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup);
|
||||
|
||||
Status = new Dictionary<NetUserId, LobbyPlayerStatus>();
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
@@ -97,8 +96,6 @@ namespace Content.Client.GameTicking.Managers
|
||||
LobbySong = message.LobbySong;
|
||||
LobbyBackground = message.LobbyBackground;
|
||||
Paused = message.Paused;
|
||||
if (IsGameStarted)
|
||||
Status.Clear();
|
||||
|
||||
LobbyStatusUpdated?.Invoke();
|
||||
}
|
||||
@@ -123,11 +120,6 @@ namespace Content.Client.GameTicking.Managers
|
||||
|
||||
private void LobbyReady(TickerLobbyReadyEvent message)
|
||||
{
|
||||
// Merge the Dictionaries
|
||||
foreach (var p in message.Status)
|
||||
{
|
||||
Status[p.Key] = p.Value;
|
||||
}
|
||||
LobbyReadyUpdated?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user