Vote type delay, code comments.

Added doc comments to server side voting API.
There is now a 4 minute delay between creating votes of the same type.
Shuffled some code around.
Made a StandardVoteType enum instead of string IDs.
This commit is contained in:
Pieter-Jan Briers
2021-07-21 19:03:10 +02:00
parent 1187185b89
commit e9af56c7c3
13 changed files with 348 additions and 49 deletions

View File

@@ -330,9 +330,18 @@ namespace Content.Shared.CCVar
* VOTE
*/
/// <summary>
/// The required ratio of the server that must agree for a restart round vote to go through.
/// </summary>
public static readonly CVarDef<float> VoteRestartRequiredRatio =
CVarDef.Create("vote.restart_required_ratio", 0.8f, CVar.SERVERONLY);
/// <summary>
/// The delay which two votes of the same type are allowed to be made by separate people, in seconds.
/// </summary>
public static readonly CVarDef<float> VoteSameTypeTimeout =
CVarDef.Create("vote.same_type_timeout", 240f, CVar.SERVERONLY);
/*
* BAN
*/