diff --git a/Content.Server/Administration/Commands/ReadyAll.cs b/Content.Server/Administration/Commands/ReadyAll.cs index c36ed3484f..63964a6739 100644 --- a/Content.Server/Administration/Commands/ReadyAll.cs +++ b/Content.Server/Administration/Commands/ReadyAll.cs @@ -1,5 +1,6 @@ using Content.Server.GameTicking; using Content.Shared.Administration; +using Content.Shared.GameTicking; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.GameObjects; @@ -11,7 +12,7 @@ namespace Content.Server.Administration.Commands public class ReadyAll : IConsoleCommand { public string Command => "readyall"; - public string Description => "Readies up all players in the lobby."; + public string Description => "Readies up all players in the lobby, except for observers."; public string Help => $"{Command} | ̣{Command} "; public void Execute(IConsoleShell shell, string argStr, string[] args) { @@ -34,7 +35,8 @@ namespace Content.Server.Administration.Commands foreach (var p in playerManager.GetAllPlayers()) { - gameTicker.ToggleReady(p, ready); + if(gameTicker.PlayersInLobby[p] != LobbyPlayerStatus.Observer) + gameTicker.ToggleReady(p, ready); } } } diff --git a/Content.Server/GameTicking/GameTicker.Lobby.cs b/Content.Server/GameTicking/GameTicker.Lobby.cs index 681da403e8..6ce931db3f 100644 --- a/Content.Server/GameTicking/GameTicker.Lobby.cs +++ b/Content.Server/GameTicking/GameTicker.Lobby.cs @@ -28,6 +28,8 @@ namespace Content.Server.GameTicking [ViewVariables] private bool _roundStartCountdownHasNotStartedYetDueToNoPlayers; + public IReadOnlyDictionary PlayersInLobby => _playersInLobby; + private void UpdateInfoText() { RaiseNetworkEvent(GetInfoMsg(), Filter.Empty().AddPlayers(_playersInLobby.Keys));