Skip to content

Commit

Permalink
Check Ckey button. (#5786)
Browse files Browse the repository at this point in the history
# About the pull request


![image](https://github.com/cmss13-devs/cmss13/assets/4447185/508fdf55-1d4e-4dfc-8fbe-61be5f905f07)

# Explain why it's good for the game

I have been wanting to do this at least ever since #5073.
Typing/copypasting keys is annoying.

# Changelog

:cl:
admin: Check Ckey verb is now available on player panel.
/:cl:
  • Loading branch information
Segrain authored Feb 23, 2024
1 parent a1c6ce1 commit 3e1c726
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/modules/admin/player_panel/actions/punish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@
user.admin_holder.player_notes_show(target.ckey)
return TRUE

/datum/player_action/check_ckey
action_tag = "check_ckey"
name = "Check Ckey"


/datum/player_action/check_ckey/act(client/user, mob/target, list/params)
user.admin_holder.check_ckey(target.ckey)
return TRUE

/datum/player_action/reset_xeno_name
action_tag = "reset_xeno_name"
Expand Down
8 changes: 8 additions & 0 deletions tgui/packages/tgui/interfaces/PlayerPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,14 @@ const PunishmentActions = (props) => {
disabled={!hasPermission(data, 'show_notes')}
onClick={() => act('show_notes')}
/>
<Button
width="100%"
icon="clipboard-list"
color="average"
content="Check Ckey"
disabled={!hasPermission(data, 'check_ckey')}
onClick={() => act('check_ckey')}
/>
</Stack>
</Section>

Expand Down

0 comments on commit 3e1c726

Please sign in to comment.