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:
@@ -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)
|
||||
|
||||
@@ -543,6 +543,32 @@ namespace Content.Shared.CCVar
|
||||
public static readonly CVarDef<float> VoteSameTypeTimeout =
|
||||
CVarDef.Create("vote.same_type_timeout", 240f, CVar.SERVERONLY);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sets the duration of the map vote timer.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int>
|
||||
VoteTimerMap = CVarDef.Create("vote.timermap", 90, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the duration of the restart vote timer.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int>
|
||||
VoteTimerRestart = CVarDef.Create("vote.timerrestart", 30, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the duration of the gamemode/preset vote timer.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int>
|
||||
VoteTimerPreset = CVarDef.Create("vote.timerpreset", 30, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the duration of the map vote timer when ALONE.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int>
|
||||
VoteTimerAlone = CVarDef.Create("vote.timeralone", 10, CVar.SERVERONLY);
|
||||
|
||||
|
||||
/*
|
||||
* BAN
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user