diff --git a/src/Jail.cs b/src/Jail.cs index c88b348..c7596b4 100644 --- a/src/Jail.cs +++ b/src/Jail.cs @@ -56,6 +56,9 @@ public class JailConfig : BasePluginConfig [JsonPropertyName("ct_armour")] public bool ct_armour { get; set; } = true; + [JsonPropertyName("warday_guns")] + public bool warday_guns { get; set; } = false; + // ratio of t to CT [JsonPropertyName("bal_guards")] public int bal_guards { get; set; } = 0; @@ -183,8 +186,10 @@ public void OnConfigParsed(JailConfig config) lr.lr_stats.config = config; lr.config = config; + warden.config = config; warden.mute.config = config; + warden.warday.config = config; JailPlayer.config = config; lr.lr_config_reload(); diff --git a/src/Warden/Warday.cs b/src/Warden/Warday.cs index c1610f9..885c666 100644 --- a/src/Warden/Warday.cs +++ b/src/Warden/Warday.cs @@ -44,11 +44,14 @@ public bool start_warday(String location, int delay) JailPlugin.start_event(); - foreach(CCSPlayerController player in Utilities.GetPlayers()) + if(config.warday_guns) { - if(player.is_valid() && player.TeamNum == Lib.TEAM_CT) + foreach(CCSPlayerController player in Utilities.GetPlayers()) { - player.event_gun_menu(); + if(player.is_valid() && player.TeamNum == Lib.TEAM_CT) + { + player.event_gun_menu(); + } } } @@ -83,6 +86,8 @@ public void map_start() round_counter = ROUND_LIMIT; } + public JailConfig config = new JailConfig(); + String WARDAY_PREFIX = $" {ChatColors.Green} [Warday]: {ChatColors.White}"; bool warday_active = false;