Add CVars for vote timers. (#6519)

* Update VoteManager.DefaultVotes.cs

Quick fix to lower map vote time to 90sec.

* Change to CVars
This commit is contained in:
Pancake
2022-02-06 21:26:19 -08:00
committed by GitHub
parent db282690e6
commit 35eb6f8576
2 changed files with 32 additions and 6 deletions

View File

@@ -58,8 +58,8 @@ namespace Content.Server.Voting.Managers
(Loc.GetString("ui-vote-restart-no"), false)
},
Duration = alone
? TimeSpan.FromSeconds(10)
: TimeSpan.FromSeconds(30),
? TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.VoteTimerAlone))
: TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.VoteTimerRestart)),
InitiatorTimeout = TimeSpan.FromMinutes(3)
};
@@ -122,8 +122,8 @@ namespace Content.Server.Voting.Managers
{
Title = Loc.GetString("ui-vote-gamemode-title"),
Duration = alone
? TimeSpan.FromSeconds(10)
: TimeSpan.FromSeconds(30)
? TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.VoteTimerAlone))
: TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.VoteTimerPreset))
};
if (alone)
@@ -167,8 +167,8 @@ namespace Content.Server.Voting.Managers
{
Title = Loc.GetString("ui-vote-map-title"),
Duration = alone
? TimeSpan.FromSeconds(10)
: TimeSpan.FromSeconds(180)
? TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.VoteTimerAlone))
: TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.VoteTimerMap))
};
if (alone)