From 4ef857985cce11d9719a2adde28abdfbe8c3991f Mon Sep 17 00:00:00 2001 From: Jabak <163307958+Jabaks@users.noreply.github.com> Date: Tue, 1 Oct 2024 23:37:57 +0300 Subject: [PATCH] govno edit --- .../_Honk/RoundEndVote/RoundEndVoteSystem.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs b/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs index 173c242f84..6730321760 100644 --- a/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs +++ b/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs @@ -12,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() { @@ -20,10 +21,20 @@ public sealed class RoundEndVoteSystem : EntitySystem private void OnRoundEndSystemChange(RoundEndSystemChangedEvent ev) { - if(_gameTicker.RunLevel != GameRunLevel.PreRoundLobby) + if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby) return; - _voteManager.CreateStandardVote(null, StandardVoteType.Preset); + var player = _playerManager.PlayerCount >= 20; + + if (player) + { + _voteManager.CreateStandardVote(null, StandardVoteType.Preset); + } + else + { + _gameTicker.SetGamePreset("Secret"); + } + _voteManager.CreateStandardVote(null, StandardVoteType.Map); }