CCVars.Vote.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. using Robust.Shared.Configuration;
  2. namespace Content.Shared.CCVar;
  3. public sealed partial class CCVars
  4. {
  5. /// <summary>
  6. /// Allows enabling/disabling player-started votes for ultimate authority
  7. /// </summary>
  8. public static readonly CVarDef<bool> VoteEnabled =
  9. CVarDef.Create("vote.enabled", true, CVar.SERVERONLY);
  10. /// <summary>
  11. /// See vote.enabled, but specific to restart votes
  12. /// </summary>
  13. public static readonly CVarDef<bool> VoteRestartEnabled =
  14. CVarDef.Create("vote.restart_enabled", true, CVar.SERVERONLY);
  15. /// <summary>
  16. /// Config for when the restart vote should be allowed to be called regardless with less than this amount of players.
  17. /// </summary>
  18. public static readonly CVarDef<int> VoteRestartMaxPlayers =
  19. CVarDef.Create("vote.restart_max_players", 20, CVar.SERVERONLY);
  20. /// <summary>
  21. /// Config for when the restart vote should be allowed to be called based on percentage of ghosts.
  22. /// </summary>
  23. public static readonly CVarDef<int> VoteRestartGhostPercentage =
  24. CVarDef.Create("vote.restart_ghost_percentage", 55, CVar.SERVERONLY);
  25. /// <summary>
  26. /// See vote.enabled, but specific to preset votes
  27. /// </summary>
  28. public static readonly CVarDef<bool> VotePresetEnabled =
  29. CVarDef.Create("vote.preset_enabled", true, CVar.SERVERONLY);
  30. /// <summary>
  31. /// See vote.enabled, but specific to map votes
  32. /// </summary>
  33. public static readonly CVarDef<bool> VoteMapEnabled =
  34. CVarDef.Create("vote.map_enabled", false, CVar.SERVERONLY);
  35. /// <summary>
  36. /// The required ratio of the server that must agree for a restart round vote to go through.
  37. /// </summary>
  38. public static readonly CVarDef<float> VoteRestartRequiredRatio =
  39. CVarDef.Create("vote.restart_required_ratio", 0.85f, CVar.SERVERONLY);
  40. /// <summary>
  41. /// Whether or not to prevent the restart vote from having any effect when there is an online admin
  42. /// </summary>
  43. public static readonly CVarDef<bool> VoteRestartNotAllowedWhenAdminOnline =
  44. CVarDef.Create("vote.restart_not_allowed_when_admin_online", true, CVar.SERVERONLY);
  45. /// <summary>
  46. /// The delay which two votes of the same type are allowed to be made by separate people, in seconds.
  47. /// </summary>
  48. public static readonly CVarDef<float> VoteSameTypeTimeout =
  49. CVarDef.Create("vote.same_type_timeout", 240f, CVar.SERVERONLY);
  50. /// <summary>
  51. /// Sets the duration of the map vote timer.
  52. /// </summary>
  53. public static readonly CVarDef<int>
  54. VoteTimerMap = CVarDef.Create("vote.timermap", 90, CVar.SERVERONLY);
  55. /// <summary>
  56. /// Sets the duration of the restart vote timer.
  57. /// </summary>
  58. public static readonly CVarDef<int>
  59. VoteTimerRestart = CVarDef.Create("vote.timerrestart", 60, CVar.SERVERONLY);
  60. /// <summary>
  61. /// Sets the duration of the gamemode/preset vote timer.
  62. /// </summary>
  63. public static readonly CVarDef<int>
  64. VoteTimerPreset = CVarDef.Create("vote.timerpreset", 30, CVar.SERVERONLY);
  65. /// <summary>
  66. /// Sets the duration of the map vote timer when ALONE.
  67. /// </summary>
  68. public static readonly CVarDef<int>
  69. VoteTimerAlone = CVarDef.Create("vote.timeralone", 10, CVar.SERVERONLY);
  70. /// <summary>
  71. /// Allows enabling/disabling player-started votekick for ultimate authority
  72. /// </summary>
  73. public static readonly CVarDef<bool> VotekickEnabled =
  74. CVarDef.Create("votekick.enabled", true, CVar.SERVERONLY);
  75. /// <summary>
  76. /// Config for when the votekick should be allowed to be called based on number of eligible voters.
  77. /// </summary>
  78. public static readonly CVarDef<int> VotekickEligibleNumberRequirement =
  79. CVarDef.Create("votekick.eligible_number", 5, CVar.SERVERONLY);
  80. /// <summary>
  81. /// Whether a votekick initiator must be a ghost or not.
  82. /// </summary>
  83. public static readonly CVarDef<bool> VotekickInitiatorGhostRequirement =
  84. CVarDef.Create("votekick.initiator_ghost_requirement", true, CVar.SERVERONLY);
  85. /// <summary>
  86. /// Should the initiator be whitelisted to initiate a votekick?
  87. /// </summary>
  88. public static readonly CVarDef<bool> VotekickInitiatorWhitelistedRequirement =
  89. CVarDef.Create("votekick.initiator_whitelist_requirement", true, CVar.SERVERONLY);
  90. /// <summary>
  91. /// Should the initiator be able to start a votekick if they are bellow the votekick.voter_playtime requirement?
  92. /// </summary>
  93. public static readonly CVarDef<bool> VotekickInitiatorTimeRequirement =
  94. CVarDef.Create("votekick.initiator_time_requirement", false, CVar.SERVERONLY);
  95. /// <summary>
  96. /// Whether a votekick voter must be a ghost or not.
  97. /// </summary>
  98. public static readonly CVarDef<bool> VotekickVoterGhostRequirement =
  99. CVarDef.Create("votekick.voter_ghost_requirement", true, CVar.SERVERONLY);
  100. /// <summary>
  101. /// Config for how many hours playtime a player must have to be able to vote on a votekick.
  102. /// </summary>
  103. public static readonly CVarDef<int> VotekickEligibleVoterPlaytime =
  104. CVarDef.Create("votekick.voter_playtime", 100, CVar.SERVERONLY);
  105. /// <summary>
  106. /// Config for how many seconds a player must have been dead to initiate a votekick / be able to vote on a votekick.
  107. /// </summary>
  108. public static readonly CVarDef<int> VotekickEligibleVoterDeathtime =
  109. CVarDef.Create("votekick.voter_deathtime", 30, CVar.REPLICATED | CVar.SERVER);
  110. /// <summary>
  111. /// The required ratio of eligible voters that must agree for a votekick to go through.
  112. /// </summary>
  113. public static readonly CVarDef<float> VotekickRequiredRatio =
  114. CVarDef.Create("votekick.required_ratio", 0.6f, CVar.SERVERONLY);
  115. /// <summary>
  116. /// Whether or not to prevent the votekick from having any effect when there is an online admin.
  117. /// </summary>
  118. public static readonly CVarDef<bool> VotekickNotAllowedWhenAdminOnline =
  119. CVarDef.Create("votekick.not_allowed_when_admin_online", true, CVar.SERVERONLY);
  120. /// <summary>
  121. /// The delay for which two votekicks are allowed to be made by separate people, in seconds.
  122. /// </summary>
  123. public static readonly CVarDef<float> VotekickTimeout =
  124. CVarDef.Create("votekick.timeout", 120f, CVar.SERVERONLY);
  125. /// <summary>
  126. /// Sets the duration of the votekick vote timer.
  127. /// </summary>
  128. public static readonly CVarDef<int>
  129. VotekickTimer = CVarDef.Create("votekick.timer", 60, CVar.SERVERONLY);
  130. /// <summary>
  131. /// Config for how many hours playtime a player must have to get protection from the Raider votekick type when playing as an antag.
  132. /// </summary>
  133. public static readonly CVarDef<int> VotekickAntagRaiderProtection =
  134. CVarDef.Create("votekick.antag_raider_protection", 10, CVar.SERVERONLY);
  135. /// <summary>
  136. /// Default severity for votekick bans
  137. /// </summary>
  138. public static readonly CVarDef<string> VotekickBanDefaultSeverity =
  139. CVarDef.Create("votekick.ban_default_severity", "High", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED);
  140. /// <summary>
  141. /// Duration of a ban caused by a votekick (in minutes).
  142. /// </summary>
  143. public static readonly CVarDef<int> VotekickBanDuration =
  144. CVarDef.Create("votekick.ban_duration", 180, CVar.SERVERONLY);
  145. /// <summary>
  146. /// Whether the ghost requirement settings for votekicks should be ignored for the lobby.
  147. /// </summary>
  148. public static readonly CVarDef<bool> VotekickIgnoreGhostReqInLobby =
  149. CVarDef.Create("votekick.ignore_ghost_req_in_lobby", true, CVar.SERVERONLY);
  150. }