From 78b5cca638ed54c9e8fb83a13c196547a53c50be Mon Sep 17 00:00:00 2001 From: Moony Date: Sat, 27 Nov 2021 19:28:32 -0600 Subject: [PATCH] Observing outside the lobby is no longer a thing you can do. (#5587) --- Content.Server/GameTicking/Commands/JoinGameCommand.cs | 2 +- Content.Server/GameTicking/Commands/ObserveCommand.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameTicking/Commands/JoinGameCommand.cs b/Content.Server/GameTicking/Commands/JoinGameCommand.cs index fb966c32b8..3e1aa2b03d 100644 --- a/Content.Server/GameTicking/Commands/JoinGameCommand.cs +++ b/Content.Server/GameTicking/Commands/JoinGameCommand.cs @@ -46,7 +46,7 @@ namespace Content.Server.GameTicking.Commands if (!ticker.PlayersInLobby.ContainsKey(player)) { - shell.WriteError($"{player.Name} not in the lobby. This incident will be reported."); + shell.WriteError($"{player.Name} is not in the lobby. This incident will be reported."); return; } diff --git a/Content.Server/GameTicking/Commands/ObserveCommand.cs b/Content.Server/GameTicking/Commands/ObserveCommand.cs index 9fc411ae2a..891b05bb74 100644 --- a/Content.Server/GameTicking/Commands/ObserveCommand.cs +++ b/Content.Server/GameTicking/Commands/ObserveCommand.cs @@ -22,7 +22,10 @@ namespace Content.Server.GameTicking.Commands } var ticker = EntitySystem.Get(); - ticker.MakeObserve(player); + if (ticker.PlayersInLobby.ContainsKey(player)) + ticker.MakeObserve(player); + else + shell.WriteError($"{player.Name} is not in the lobby. This incident will be reported."); } } }