mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Advanced who was doing (Testname represents Ckey, StealthTest represents stealth Ckey) "Testname" for admins when unstealthed, which was good, but it was doing "TestnameStealthTest" when admins were stealthed. This PR makes it start off as "Testname", then checks to see if they are stealthed. If so, it becomes "StealthTest," then adds in all the additional info (If they are observing, in lobby, or playing.)
83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
|
|
/client/verb/who_advanced()
|
|
set name = "Advanced Who"
|
|
set category = "OOC"
|
|
|
|
var/msg = "<b>Current Players:</b>\n"
|
|
|
|
var/list/Lines = list()
|
|
|
|
if(holder && (R_ADMIN & holder.rights || R_MOD & holder.rights))
|
|
for(var/client/C in clients)
|
|
var/entry = "\t[C.key]"
|
|
if(C.holder && C.holder.fakekey)
|
|
entry += " <i>(as [C.holder.fakekey])</i>"
|
|
entry += " - Playing as [C.mob.real_name]"
|
|
switch(C.mob.stat)
|
|
if(UNCONSCIOUS)
|
|
entry += " - <font color='darkgray'><b>Unconscious</b></font>"
|
|
if(DEAD)
|
|
if(isobserver(C.mob))
|
|
var/mob/observer/dead/O = C.mob
|
|
if(O.started_as_observer)
|
|
entry += " - <font color='gray'>Observing</font>"
|
|
else
|
|
entry += " - <font color='black'><b>DEAD</b></font>"
|
|
else
|
|
entry += " - <font color='black'><b>DEAD</b></font>"
|
|
|
|
var/age
|
|
if(isnum(C.player_age))
|
|
age = C.player_age
|
|
else
|
|
age = 0
|
|
|
|
if(age <= 1)
|
|
age = "<font color='#ff0000'><b>[age]</b></font>"
|
|
else if(age < 10)
|
|
age = "<font color='#ff8c00'><b>[age]</b></font>"
|
|
|
|
entry += " - [age]"
|
|
|
|
if(is_special_character(C.mob))
|
|
entry += " - <b><font color='red'>Antagonist</font></b>"
|
|
|
|
if(C.is_afk())
|
|
var/seconds = C.last_activity_seconds()
|
|
entry += " (AFK - "
|
|
entry += "[round(seconds / 60)] minutes, "
|
|
entry += "[seconds % 60] seconds)"
|
|
|
|
entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)"
|
|
|
|
Lines += entry
|
|
else
|
|
for(var/client/C in clients)
|
|
if(C.holder && C.holder.fakekey)
|
|
var/entry = "\t[C.key]"
|
|
var/mob/observer/dead/O = C.mob
|
|
entry = C.holder.fakekey
|
|
if(isobserver(O))
|
|
entry += " - <font color='gray'>Observing</font>"
|
|
else if(istype(O,/mob/new_player))
|
|
entry += " - <font color='blue'>In Lobby</font>"
|
|
else
|
|
entry += " - <font color='green'>Playing</font>"
|
|
Lines += entry
|
|
else
|
|
var/entry = "\t[C.key]"
|
|
var/mob/observer/dead/O = C.mob
|
|
if(isobserver(O)) //Woo, players can see
|
|
entry += " - <font color='gray'>Observing</font>"
|
|
else if(istype(O,/mob/new_player))
|
|
entry += " - <font color='blue'>In Lobby</font>"
|
|
else
|
|
entry += " - <font color='green'>Playing</font>"
|
|
Lines += entry
|
|
|
|
for(var/line in sortList(Lines))
|
|
msg += "[line]\n"
|
|
|
|
msg += "<b>Total Players: [length(Lines)]</b>"
|
|
src << msg
|