From 53bd0569eafee46771fcfcf28b507ede15896e8d Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Tue, 19 Nov 2024 00:08:32 +0300 Subject: [PATCH] 1.2 --- .../_Honk/RoundEndVote/RoundEndVoteSystem.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs b/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs index 9911d3b8ae..c90471e490 100644 --- a/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs +++ b/Content.Server/_Honk/RoundEndVote/RoundEndVoteSystem.cs @@ -3,11 +3,10 @@ using Content.Server.RoundEnd; using Content.Server.Voting.Managers; using Content.Shared.Voting; using Robust.Server.Player; - +using Robust.Shared.Timing; namespace Content.Server._Honk.RoundEndVote; - public sealed class RoundEndVoteSystem : EntitySystem { [Dependency] private readonly IVoteManager _voteManager = default!; @@ -24,6 +23,22 @@ public sealed class RoundEndVoteSystem : EntitySystem if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby) return; + if (_playerManager.PlayerCount == 0) + { + _gameTicker.DelayStart(TimeSpan.FromSeconds(60)); + Timer.Spawn(60 * 1000, () => + { + if (_playerManager.PlayerCount >= 15) + { + _voteManager.CreateStandardVote(null, StandardVoteType.Preset); + } + else if (_playerManager.PlayerCount >= 5) + { + _gameTicker.SetGamePreset("Extended"); + } + }); + } + if (_playerManager.PlayerCount >= 15) { _voteManager.CreateStandardVote(null, StandardVoteType.Preset);