/client/proc/cmd_admin_playeropt(mob/M as mob in world)
set name = "Player Options"
set category = null
if (src.holder)
src.holder.playeropt(M)
return
/datum/admins/proc/playeropt_link(mob/M, action)
return "?src=\ref[src];action=[action];targetckey=[M.ckey];targetmob=\ref[M];origin=adminplayeropts"
/datum/admins/proc/playeropt(mob/M)
if (!ismob(M))
alert("Unable to auto-refresh the panel. Manual refresh required.")
return
if (istype(M, /mob/living/silicon/ai))
var/mob/living/silicon/ai/AI = M
if (AI.deployed_to_eyecam)
M = AI.eyecam
// The topBar style here is so that it can continue to happily chill at the top of even chui windows
var/header_thing_chui_toggle = (usr.client && !usr.client.use_chui) ? "
" : ""
var/dat = {"
[header_thing_chui_toggle]
[M.name] ([M.key ? M.key : "NO CKEY"]) Options
"}
//Antag roles (yes i said antag jeez shut up about it already)
var/antag
if (M.mind && M.mind.special_role != null)
antag = {"
[M.mind.special_role] —
Remove
"}
else if (!isobserver(M))
antag = "Make Antagonist"
else
antag = "Observer"
//General info
// Logs link:
// LOGS
dat += {"
[M.name] (
[M.key ? M.key : "no key"])
Mob: [M.name] ([M.key ? M.key : "no key"])
[M.client ? "" : "(no client)"]
[isdead(M) ? "(dead)" : ""]
Mob Type: [M.type] ([antag])
"}
if (M.client)
dat += {"
"}
if (!istype(M, /mob/new_player))
//Wire: Hey I wonder if I can put a short syntax condition with a multi-line text result inside a multi-line text string
//Turns out yes but good lord does it break dream maker syntax highlighting
//dat += {"[M.client ? " | " : ""][ishuman(M) ? {"
Reagents:
dat += {"
Common
[!isobserver(M) ? {"
Health
Check •
Heal •
[(M.stat == 2 || M.max_health == 0) ? "Dead" : "[round(100 * M.health / M.max_health)]%"]
"} : ""]
[!ishuman(M) ? "" : {"
"}]
Abilities
Contents
Gib
"}
//Movement based options
if(!istype(M, /mob/new_player))
var/turf/T = get_turf(M)
var/turf/A = get_area(T)
var/atom/Q = M.loc
dat += {"
Movement
Common
Jump to •
Get •
Send to...
Currently in [A]
[T.x], [T.y], [T.z][(Q && Q != T) ? ", inside \the [Q]" : ""]
Prison
"}
//Admin control options
if (M.client || M.ckey)
dat += {"
Control
"}
if (M.client)
dat += {"
Client
"}
if (M.ckey)
dat += {"
Key
Persistent
"}
dat += "
"
//Very special roles
if(!istype(M, /mob/new_player))
dat += {"
Antagonist Options
Antag Status
[antag]
Make Into
[iswraith(M) ? "
Is Wraith" : "
Wraith"] •
[isblob(M) ? "
Is Blob" : "
Blob"] •
[istype(M, /mob/living/carbon/human/machoman) ? "
Is Macho Man" : "
Macho Man"] •
[iswelder(M) ? "
Is Welder" : "
Welder"] •
[isflock(M) ? "
Is Flock" : "
Flock"]
"}
dat += {"
"}
//if (!isobserver(M)) //moved from SG level stuff
// dat += " | Polymorph"
//dat += ""
//Coder options
if( src.level >= LEVEL_SHITGUY )
dat += {"
High Level Problems
Shit Person
"}
if (src.level >= LEVEL_CODER)
dat += {"
Coder
"}
dat += {"
"}
var/windowHeight = "450"
if (src.level == LEVEL_SHITGUY)
windowHeight = "550"
else if (src.level == LEVEL_CODER)
windowHeight = "600"
usr.Browse(dat, "window=adminplayeropts[M.ckey];size=600x[windowHeight]")