Add variables to prevent voting of various kinds (#5361)

* Add a way to disable voting for maximum authoritarianism

* Allow disabling specific vote types via cvars

* Migrate standard-vote-to-cvar dictionary to being static
This commit is contained in:
20kdc
2021-11-23 17:03:04 +00:00
committed by GitHub
parent 781a083fcf
commit a2b7982c37
7 changed files with 84 additions and 7 deletions

View File

@@ -186,7 +186,8 @@ namespace Content.Client.Voting
_standardVoteTimeouts.Clear();
foreach (var (type, time) in message.VotesUnavailable)
{
_standardVoteTimeouts.Add(type, _gameTiming.RealServerToLocal(time));
var fixedTime = (time == TimeSpan.Zero) ? time : _gameTiming.RealServerToLocal(time);
_standardVoteTimeouts.Add(type, fixedTime);
}
CanCallStandardVotesChanged?.Invoke();