diff --git a/src/Jail.cs b/src/Jail.cs index 7805833..1c7ba9d 100644 --- a/src/Jail.cs +++ b/src/Jail.cs @@ -65,6 +65,8 @@ public class JailConfig : BasePluginConfig [JsonPropertyName("warden_force_removal")] public bool warden_force_removal { get; set; } = true; + [JsonPropertyName("strip_spawn_weapons")] + public bool strip_spawn_weapons { get; set; } = true; [JsonPropertyName("warday_guns")] public bool warday_guns { get; set; } = false; diff --git a/src/Warden/JailPlayer.cs b/src/Warden/JailPlayer.cs index a8e23a9..7c26beb 100644 --- a/src/Warden/JailPlayer.cs +++ b/src/Warden/JailPlayer.cs @@ -260,6 +260,7 @@ public void set_rebel(CCSPlayerController? player) { if(config.colour_rebel) { + Lib.announce(REBEL_PREFIX,$"{} is a rebel",player.PlayerName); player.set_colour(Lib.RED); } is_rebel = true; @@ -284,7 +285,7 @@ public void rebel_death(CCSPlayerController? player,CCSPlayerController? killer) if(is_rebel && killer.TeamNum == Lib.TEAM_CT) { Lib.log($"rebel {player.PlayerName} killed by {killer.PlayerName}"); - Lib.localise_announce($" {ChatColors.Green}[REBEL]: {ChatColors.White}","rebel.kill",killer.PlayerName,player.PlayerName); + Lib.localise_announce(REBEL_PREFIX,"rebel.kill",killer.PlayerName,player.PlayerName); } } @@ -323,6 +324,8 @@ public void player_hurt(CCSPlayerController? player, CCSPlayerController? attack } + public static readonly String REBEL_PREFIX = $" {ChatColors.Green}[REBEL]: {ChatColors.White}"; + public static JailConfig config = new JailConfig(); public Color laser_colour { get; private set; } = Lib.CYAN; diff --git a/src/Warden/Warden.cs b/src/Warden/Warden.cs index f5e8fef..d3f0f4e 100644 --- a/src/Warden/Warden.cs +++ b/src/Warden/Warden.cs @@ -370,9 +370,13 @@ void setup_cvar() { Server.ExecuteCommand("mp_force_pick_time 3000"); Server.ExecuteCommand("mp_autoteambalance 0"); - Server.ExecuteCommand("mp_equipment_reset_rounds 1"); - Server.ExecuteCommand("mp_t_default_secondary \"\" "); - Server.ExecuteCommand("mp_ct_default_secondary \"\" "); + + if(config.strip_spawn_weapons) + { + Server.ExecuteCommand("mp_equipment_reset_rounds 1"); + Server.ExecuteCommand("mp_t_default_secondary \"\" "); + Server.ExecuteCommand("mp_ct_default_secondary \"\" "); + } } public void round_start() @@ -427,7 +431,10 @@ public void setup_player_guns(CCSPlayerController? player) } // strip weapons just in case - player.strip_weapons(); + if(config.strip_spawn_weapons) + { + player.strip_weapons(); + } if(player.is_ct()) {