Skip to content

Commit

Permalink
Merge pull request #9 from Crowbar764/tgui-player-panel
Browse files Browse the repository at this point in the history
TGUI: Admin Player Panel
  • Loading branch information
MosleyTheMalO authored Jul 11, 2024
2 parents f9c7c2c + ef2e066 commit bacc87c
Show file tree
Hide file tree
Showing 13 changed files with 1,937 additions and 4 deletions.
13 changes: 11 additions & 2 deletions code/modules/admin/verbs/admingame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@ ADMIN_VERB(cmd_player_panel, R_ADMIN, "Player Panel", "See all players and their
user.holder.player_panel_new()

ADMIN_VERB_ONLY_CONTEXT_MENU(show_player_panel, R_ADMIN, "Show Player Panel", mob/player in world)
log_admin("[key_name(user)] checked the individual player panel for [key_name(player)][isobserver(user.mob)?"":" while in game"].")

if(!player)
to_chat(user, span_warning("You seem to be selecting a mob that doesn't exist anymore."), confidential = TRUE)
return

// SPLURT EDIT START
var/useModern = user.prefs.read_preference(/datum/preference/toggle/use_tgui_player_panel)
if (useModern)
if(!player.mob_panel)
player.create_player_panel()
player.mob_panel.ui_interact(user.mob)
return
// SPLURT EDIT END

log_admin("[key_name(user)] checked the individual player panel for [key_name(player)][isobserver(user.mob)?"":" while in game"].")

var/body = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Options for [player.key]</title></head>"
body += "<body>Options panel for <b>[player]</b>"
if(player.client)
Expand Down
Loading

0 comments on commit bacc87c

Please sign in to comment.