From 2c8f38abf31c351c7ccb96b14342cb67f1f59165 Mon Sep 17 00:00:00 2001 From: destoer Date: Thu, 28 Dec 2023 00:22:11 +0000 Subject: [PATCH] move force_open out of debug --- src/Debug.cs | 6 ------ src/Jail.cs | 3 ++- src/Warden/Warden.cs | 7 +++++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Debug.cs b/src/Debug.cs index c649e5c..e6d4e57 100644 --- a/src/Debug.cs +++ b/src/Debug.cs @@ -28,12 +28,6 @@ public static void nuke(CCSPlayerController? invoke, CommandInfo command) } } - [RequiresPermissions("@jail/debug")] - public static void force_open_cmd(CCSPlayerController? invoke, CommandInfo command) - { - Lib.force_open(); - } - [RequiresPermissions("@jail/debug")] public static void test_laser(CCSPlayerController? invoke, CommandInfo command) { diff --git a/src/Jail.cs b/src/Jail.cs index c7596b4..934a087 100644 --- a/src/Jail.cs +++ b/src/Jail.cs @@ -221,6 +221,8 @@ void register_commands() AddCommand("guns","give ct guns",warden.cmd_ct_guns); + AddCommand("force_open","force open every door and vent",warden.force_open_cmd); + // reg lr commands AddCommand("lr","start an lr",lr.lr_cmd); AddCommand("cancel_lr","admin : cancel lr",lr.cancel_lr_cmd); @@ -237,7 +239,6 @@ void register_commands() if(Debug.enable) { AddCommand("nuke","debug : kill every player",Debug.nuke); - AddCommand("force_open","debug : force open every door and vent",Debug.force_open_cmd); AddCommand("is_rebel","debug : print rebel state to console",warden.is_rebel_cmd); AddCommand("lr_debug","debug : start an lr without restriction",lr.lr_debug_cmd); AddCommand("is_blocked","debug : print block state",warden.block.is_blocked); diff --git a/src/Warden/Warden.cs b/src/Warden/Warden.cs index 2e282ea..80034fc 100644 --- a/src/Warden/Warden.cs +++ b/src/Warden/Warden.cs @@ -101,6 +101,13 @@ public void remove_warden_cmd(CCSPlayerController? player, CommandInfo command) remove_warden(); } + [RequiresPermissions("@css/generic")] + public void force_open_cmd(CCSPlayerController? invoke, CommandInfo command) + { + Lib.force_open(); + } + + public void warday_cmd(CCSPlayerController? player, CommandInfo command) { if(player == null || !player.is_valid())