From 85ea135ad4f8fe28cdbb94a2aeb8305111d688d7 Mon Sep 17 00:00:00 2001 From: Moony Date: Fri, 26 Nov 2021 04:03:29 -0600 Subject: [PATCH] Oh god (#5534) * Fixes the funny station issue and prevents free respawns * not in the sudoers file --- Content.Server/GameTicking/Commands/JoinGameCommand.cs | 7 +++++++ Content.Server/Station/StationSystem.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameTicking/Commands/JoinGameCommand.cs b/Content.Server/GameTicking/Commands/JoinGameCommand.cs index 15d6a92027..176a8a430e 100644 --- a/Content.Server/GameTicking/Commands/JoinGameCommand.cs +++ b/Content.Server/GameTicking/Commands/JoinGameCommand.cs @@ -43,6 +43,13 @@ namespace Content.Server.GameTicking.Commands var ticker = EntitySystem.Get(); var stationSystem = EntitySystem.Get(); + + if (!ticker.PlayersInLobby.ContainsKey(player)) + { + shell.WriteError($"{player.Name} not in the lobby. This incident will be reported."); + return; + } + if (ticker.RunLevel == GameRunLevel.PreRoundLobby) { shell.WriteLine("Round has not started."); diff --git a/Content.Server/Station/StationSystem.cs b/Content.Server/Station/StationSystem.cs index 782ef04a74..d514ca36f7 100644 --- a/Content.Server/Station/StationSystem.cs +++ b/Content.Server/Station/StationSystem.cs @@ -35,7 +35,7 @@ public class StationSystem : EntitySystem /// private void OnRoundEnd(GameRunLevelChangedEvent eventArgs) { - if (eventArgs.New == GameRunLevel.PostRound) + if (eventArgs.New == GameRunLevel.PreRoundLobby) _stationInfo = new(); }