diff --git a/Content.Server/GameTicking/Commands/ForcePresetCommand.cs b/Content.Server/GameTicking/Commands/ForcePresetCommand.cs index 23da792921..b3ca19f6f5 100644 --- a/Content.Server/GameTicking/Commands/ForcePresetCommand.cs +++ b/Content.Server/GameTicking/Commands/ForcePresetCommand.cs @@ -38,6 +38,7 @@ namespace Content.Server.GameTicking.Commands ticker.SetGamePreset(type, true); shell.WriteLine($"Forced the game to start with preset {name}."); + ticker.UpdateInfoText(); } } } diff --git a/Content.Server/GameTicking/GameTicker.Lobby.cs b/Content.Server/GameTicking/GameTicker.Lobby.cs index 16fb5ea038..c917af498d 100644 --- a/Content.Server/GameTicking/GameTicker.Lobby.cs +++ b/Content.Server/GameTicking/GameTicker.Lobby.cs @@ -28,7 +28,7 @@ namespace Content.Server.GameTicking public IReadOnlyDictionary PlayersInLobby => _playersInLobby; public IReadOnlySet PlayersInGame => _playersInGame; - private void UpdateInfoText() + public void UpdateInfoText() { RaiseNetworkEvent(GetInfoMsg(), Filter.Empty().AddPlayers(_playersInLobby.Keys)); } diff --git a/Content.Server/GameTicking/GameTicker.Player.cs b/Content.Server/GameTicking/GameTicker.Player.cs index caba79931f..cf252a8d1c 100644 --- a/Content.Server/GameTicking/GameTicker.Player.cs +++ b/Content.Server/GameTicking/GameTicker.Player.cs @@ -106,6 +106,8 @@ namespace Content.Server.GameTicking break; } } + //When the status of a player changes, update the server info text + UpdateInfoText(); async void SpawnWaitPrefs() { diff --git a/Content.Server/Maps/GameMapManager.cs b/Content.Server/Maps/GameMapManager.cs index fccd3c5b62..8777f15f76 100644 --- a/Content.Server/Maps/GameMapManager.cs +++ b/Content.Server/Maps/GameMapManager.cs @@ -87,6 +87,8 @@ public sealed class GameMapManager : IGameMapManager _currentMap = map; _currentMapForced = false; + var ticker = EntitySystem.Get(); + ticker.UpdateInfoText(); return true; } @@ -97,6 +99,8 @@ public sealed class GameMapManager : IGameMapManager throw new ArgumentException($"The map \"{gameMap}\" is invalid!"); _currentMap = map; _currentMapForced = true; + var ticker = EntitySystem.Get(); + ticker.UpdateInfoText(); } public void SelectRandomMap() @@ -104,6 +108,8 @@ public sealed class GameMapManager : IGameMapManager var maps = CurrentlyEligibleMaps().ToList(); _currentMap = _random.Pick(maps); _currentMapForced = false; + var ticker = EntitySystem.Get(); + ticker.UpdateInfoText(); } public GameMapPrototype GetSelectedMap() diff --git a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs index a70b86810d..410b665225 100644 --- a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs +++ b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs @@ -42,7 +42,8 @@ namespace Content.Server.Voting.Managers default: throw new ArgumentOutOfRangeException(nameof(voteType), voteType, null); } - + var ticker = EntitySystem.Get(); + ticker.UpdateInfoText(); TimeoutStandardVote(voteType); }