Skip to content

Commit

Permalink
move force_open out of debug
Browse files Browse the repository at this point in the history
  • Loading branch information
destoer committed Dec 28, 2023
1 parent 1fe958a commit 2c8f38a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Jail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions src/Warden/Warden.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 2c8f38a

Please sign in to comment.