diff --git a/src/Jail.cs b/src/Jail.cs index 0435432..c88b348 100644 --- a/src/Jail.cs +++ b/src/Jail.cs @@ -66,6 +66,10 @@ public class JailConfig : BasePluginConfig [JsonPropertyName("hide_kills")] public bool hide_kills { get; set; } = false; + + [JsonPropertyName("colour_rebel")] + public bool colour_rebel { get; set; } = false; + [JsonPropertyName("lr_knife")] public bool lr_knife { get; set; } = true; @@ -181,6 +185,7 @@ public void OnConfigParsed(JailConfig config) lr.config = config; warden.config = config; warden.mute.config = config; + JailPlayer.config = config; lr.lr_config_reload(); } diff --git a/src/Warden/JailPlayer.cs b/src/Warden/JailPlayer.cs index b691919..cd26213 100644 --- a/src/Warden/JailPlayer.cs +++ b/src/Warden/JailPlayer.cs @@ -50,6 +50,10 @@ public void set_rebel(CCSPlayerController? player) // on T with no warday or sd active if(player.TeamNum == Lib.TEAM_T) { + if(config.colour_rebel) + { + player.set_colour(Lib.RED); + } is_rebel = true; } } @@ -78,7 +82,7 @@ public void rebel_death(CCSPlayerController? player,CCSPlayerController? killer) public void rebel_weapon_fire(CCSPlayerController? player, String weapon) { // ignore weapons players are meant to have - if(weapon != "knife" && weapon != "c4") + if(!weapon.Contains("knife") && !weapon.Contains("c4")) { set_rebel(player); } @@ -106,6 +110,7 @@ public void player_hurt(CCSPlayerController? player, CCSPlayerController? attack // TODO: Laser stuff needs to go here! // but we dont have access to the necessary primtives yet + public static JailConfig config = new JailConfig(); public bool is_rebel = false; };