Skip to content

Commit

Permalink
add warden command list
Browse files Browse the repository at this point in the history
  • Loading branch information
destoer committed Nov 27, 2023
1 parent b17eb11 commit bf07583
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Jail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void register_commands()
AddCommand("wb","warden : enable block",warden.wb_cmd);

AddCommand("wd","warden : start warday",warden.warday_cmd);
AddCommand("wcommands", "warden : show all commands",warden.cmd_info);

// reg lr commands
AddCommand("lr","start an lr",lr.lr_cmd);
Expand Down
17 changes: 17 additions & 0 deletions src/Warden/Warden.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void set_warden(int? new_slot_opt)

announce($"{player.PlayerName} is now the warden");

player.announce(WARDEN_PREFIX,"Type !wcommands to see a full list of warden commands");

// change player color!
player.set_colour(Color.FromArgb(255, 0, 0, 255));
}
Expand Down Expand Up @@ -192,6 +194,21 @@ public void is_rebel_cmd(CCSPlayerController? invoke, CommandInfo command)
}
}

public void cmd_info(CCSPlayerController? player, CommandInfo command)
{
if(player == null || !player.is_valid())
{
return;
}

player.PrintToChat("!w - take warden");
player.PrintToChat("!wd - start a warday");
player.PrintToChat("!uw - leave warden");
player.PrintToChat("!wb - enable block");
player.PrintToChat("!wub - disable block");
player.PrintToChat("!rw - admin remove warden");
}

public void take_warden_cmd(CCSPlayerController? player, CommandInfo command)
{
// invalid player we dont care
Expand Down

0 comments on commit bf07583

Please sign in to comment.