From ccec00cd7ab7f739413c5e927d3f8e877cc90e5f Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Wed, 13 Nov 2024 11:16:28 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs index 31c9f7ff833..f58da3b037f 100644 --- a/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs +++ b/Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs @@ -226,6 +226,11 @@ private void CreatePresetVote(ICommonSession? initiator) { var presets = GetGamePresets(); + // Sunrise-Start + if (presets.Count < 1) + return; + // Sunrise-End + var alone = _playerManager.PlayerCount == 1 && initiator != null; var options = new VoteOptions { @@ -594,7 +599,7 @@ private void TimeoutStandardVote(StandardVoteType type) private Dictionary GetGamePresets() { var presets = new Dictionary(); - + var prototypeId = _cfg.GetCVar(SunriseCCVars.RoundVotingChancesPrototype); if (!_prototypeManager.TryIndex(prototypeId, out var chancesPrototype))