Add Votekick functionality (#32005)
This commit is contained in:
@@ -1404,7 +1404,6 @@ 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>
|
||||
@@ -1429,6 +1428,87 @@ namespace Content.Shared.CCVar
|
||||
public static readonly CVarDef<int>
|
||||
VoteTimerAlone = CVarDef.Create("vote.timeralone", 10, CVar.SERVERONLY);
|
||||
|
||||
/*
|
||||
* VOTEKICK
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Allows enabling/disabling player-started votekick for ultimate authority
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> VotekickEnabled =
|
||||
CVarDef.Create("votekick.enabled", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Config for when the votekick should be allowed to be called based on number of eligible voters.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> VotekickEligibleNumberRequirement =
|
||||
CVarDef.Create("votekick.eligible_number", 10, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Whether a votekick initiator must be a ghost or not.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> VotekickInitiatorGhostRequirement =
|
||||
CVarDef.Create("votekick.initiator_ghost_requirement", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Whether a votekick voter must be a ghost or not.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> VotekickVoterGhostRequirement =
|
||||
CVarDef.Create("votekick.voter_ghost_requirement", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Config for how many hours playtime a player must have to be able to vote on a votekick.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> VotekickEligibleVoterPlaytime =
|
||||
CVarDef.Create("votekick.voter_playtime", 100, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Config for how many seconds a player must have been dead to initiate a votekick / be able to vote on a votekick.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> VotekickEligibleVoterDeathtime =
|
||||
CVarDef.Create("votekick.voter_deathtime", 180, CVar.REPLICATED | CVar.SERVER);
|
||||
|
||||
/// <summary>
|
||||
/// The required ratio of eligible voters that must agree for a votekick to go through.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> VotekickRequiredRatio =
|
||||
CVarDef.Create("votekick.required_ratio", 0.6f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not to prevent the votekick from having any effect when there is an online admin.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> VotekickNotAllowedWhenAdminOnline =
|
||||
CVarDef.Create("votekick.not_allowed_when_admin_online", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// The delay for which two votekicks are allowed to be made by separate people, in seconds.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> VotekickTimeout =
|
||||
CVarDef.Create("votekick.timeout", 120f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the duration of the votekick vote timer.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int>
|
||||
VotekickTimer = CVarDef.Create("votekick.timer", 60, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Config for how many hours playtime a player must have to get protection from the Raider votekick type when playing as an antag.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> VotekickAntagRaiderProtection =
|
||||
CVarDef.Create("votekick.antag_raider_protection", 10, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Default severity for votekick bans
|
||||
/// </summary>
|
||||
public static readonly CVarDef<string> VotekickBanDefaultSeverity =
|
||||
CVarDef.Create("votekick.ban_default_severity", "High", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED);
|
||||
|
||||
/// <summary>
|
||||
/// Duration of a ban caused by a votekick (in minutes).
|
||||
/// </summary>
|
||||
public static readonly CVarDef<int> VotekickBanDuration =
|
||||
CVarDef.Create("votekick.ban_duration", 180, CVar.SERVERONLY);
|
||||
|
||||
/*
|
||||
* BAN
|
||||
|
||||
Reference in New Issue
Block a user