diff --git a/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs b/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs index 2633c8e58f..14e1b64ebc 100644 --- a/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs +++ b/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs @@ -2,6 +2,7 @@ using Content.Server.RoundEnd; using Content.Server.Voting.Managers; using Content.Shared.Voting; +using Robust.Server.Player; namespace Content.Server._Honk.RoundEndVote; @@ -11,6 +12,7 @@ public sealed class RoundEndVoteSystem : EntitySystem { [Dependency] private readonly IVoteManager _voteManager = default!; [Dependency] private readonly GameTicker _gameTicker = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; public override void Initialize() { @@ -19,12 +21,19 @@ public sealed class RoundEndVoteSystem : EntitySystem private void OnRoundEndSystemChange(RoundEndSystemChangedEvent ev) { - //Эта строка проверяет, не находится ли игра в состоянии "PreRoundLobby". if(_gameTicker.RunLevel != GameRunLevel.PreRoundLobby) return; - _voteManager.CreateStandardVote(null, StandardVoteType.Preset); + var player = _playerManager.PlayerCount; + + if (player >= 20) + { + _voteManager.CreateStandardVote(null, StandardVoteType.Preset); + } + _voteManager.CreateStandardVote(null, StandardVoteType.Map); + + _gameTicker.SetGamePreset("Secret"); } }