Refactor lobby status (#10550)

This commit is contained in:
wrexbe
2022-08-14 12:54:49 -07:00
committed by GitHub
parent c535214aa2
commit c4d135e253
15 changed files with 126 additions and 108 deletions

View File

@@ -40,7 +40,7 @@ namespace Content.Server.GameTicking.Commands
var stationSystem = EntitySystem.Get<StationSystem>();
var stationJobs = EntitySystem.Get<StationJobsSystem>();
if (!ticker.PlayersInLobby.ContainsKey(player) || ticker.PlayersInLobby[player] == LobbyPlayerStatus.Observer)
if (ticker.PlayerGameStatuses.TryGetValue(player.UserId, out var status) && status == PlayerGameStatus.JoinedGame)
{
Logger.InfoS("security", $"{player.Name} ({player.UserId}) attempted to latejoin while in-game.");
shell.WriteError($"{player.Name} is not in the lobby. This incident will be reported.");