cleans up advanced_who output (#7148)

* cleans up advanced_who output

* Missing tag
This commit is contained in:
Atermonera
2020-05-15 13:35:57 -07:00
committed by VirgoBot
parent 51c38f8555
commit b6c8d31829
3 changed files with 70 additions and 25 deletions

View File

@@ -7,24 +7,36 @@
var/list/Lines = list() var/list/Lines = list()
if(holder && (R_ADMIN & holder.rights || R_MOD & holder.rights)) if(holder)
for(var/client/C in GLOB.clients) for(var/client/C in GLOB.clients)
var/entry = "\t[C.key]" var/entry = "<tr><td>[C.key]"
if(C.holder && C.holder.fakekey) if(C.holder && C.holder.fakekey)
entry += " <i>(as [C.holder.fakekey])</i>" entry += " <i>(as [C.holder.fakekey])</i>"
entry += " - Playing as [C.mob.real_name]"
switch(C.mob.stat) entry += "</td><td>"
if(UNCONSCIOUS)
entry += " - <font color='darkgray'><b>Unconscious</b></font>" if(C.mob.real_name)
if(DEAD) switch(C.mob.stat)
if(isobserver(C.mob)) if(UNCONSCIOUS)
var/mob/observer/dead/O = C.mob entry += "<span class='darkgray'><b>Unconscious</b></span>" // these are literally all spans so I can apply .inverted to them because black on dark grey isn't legible
if(O.started_as_observer)
entry += " - <font color='gray'>Observing</font>" if(DEAD)
else if(isobserver(C.mob))
entry += " - <font color='black'><b>DEAD</b></font>" var/mob/observer/dead/O = C.mob
if(O.started_as_observer)
entry += "<span class='gray'>Observing</span>"
else
entry += "<span class='black'><b>Died</b></span>"
else else
entry += " - <font color='black'><b>DEAD</b></font>" entry += "<span class='green'>Playing</span>"
entry += " as [C.mob.real_name]"
else if(isnewplayer(C.mob))
entry += "<span class='blue'><b>In lobby</b></span>"
entry += "</td><td>"
var/age var/age
if(isnum(C.player_age)) if(isnum(C.player_age))
@@ -33,14 +45,20 @@
age = 0 age = 0
if(age <= 1) if(age <= 1)
age = "<font color='#ff0000'><b>[age]</b></font>" age = "<span class='red'><b>[age]</b></span>"
else if(age < 10) else if(age < 10)
age = "<font color='#ff8c00'><b>[age]</b></font>" age = "<span class='orange'><b>[age]</b></span>"
entry += " - [age]" entry += "Age: [age]"
entry += "</td><td>"
if(is_special_character(C.mob)) if(is_special_character(C.mob))
entry += " - <b><font color='red'>Antagonist</font></b>" if(C.mob?.mind?.special_role)
entry += "<b><span class='red'>[C.mob.mind.special_role]</span></b>"
else
entry += "<b><span class='red'>Antagonist</span></b>"
entry += "</td><td>"
if(C.is_afk()) if(C.is_afk())
var/seconds = C.last_activity_seconds() var/seconds = C.last_activity_seconds()
@@ -48,7 +66,9 @@
entry += "[round(seconds / 60)] minutes, " entry += "[round(seconds / 60)] minutes, "
entry += "[seconds % 60] seconds)" entry += "[seconds % 60] seconds)"
entry += "</td><td>"
entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)" entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)"
entry += "</td></tr>"
Lines += entry Lines += entry
else else
@@ -60,16 +80,17 @@
entry += "[C.key]" entry += "[C.key]"
var/mob/observer/dead/O = C.mob var/mob/observer/dead/O = C.mob
if(isobserver(O)) if(isobserver(O))
entry += " - <font color='gray'>Observing</font>" entry += " - <span class='gray'>Observing</span><br>"
else if(istype(O,/mob/new_player)) else if(istype(O,/mob/new_player))
entry += " - <font color='blue'>In Lobby</font>" entry += " - <span class='blue'>In Lobby</span><br>"
else else
entry += " - <font color='green'>Playing</font>" entry += " - <span class='green'>Playing</span><br>"
Lines += entry Lines += entry
msg += "<table>"
for(var/line in sortList(Lines)) for(var/line in sortList(Lines))
msg += "[line]\n" msg += "[line]"
msg += "</table>"
msg += "<b>Total Players: [length(Lines)]</b>" msg += "<b>Total Players: [length(Lines)]</b>"
msg = "<span class='info'>" + msg + "</span>" msg = "<span class='filter_info'>" + msg + "</span>"
to_chat(src, msg) to_chat(src, msg)

View File

@@ -165,13 +165,28 @@ h1.alert, h2.alert {color: #000000;}
.bug {color: #9e9e39;} .bug {color: #9e9e39;}
.vox {color: #AA00AA;} .vox {color: #AA00AA;}
.promethean {color: #5A5A5A; font-family:"Comic Sans MS","Comic Sans",cursive;} .promethean {color: #5A5A5A; font-family:"Comic Sans MS","Comic Sans",cursive;}
.inverted .promethean {color: #A5A5A5; font-family:"Comic Sans MS","Comic Sans",cursive;} .inverted .promethean {color: #A5A5A5; font-family:"Comic Sans MS","Comic Sans",cursive;}
.zaddat {color: #941C1C;} .zaddat {color: #941C1C;}
.rough {font-family: "Trebuchet MS", cursive, sans-serif;} .rough {font-family: "Trebuchet MS", cursive, sans-serif;}
.say_quote {font-family: Georgia, Verdana, sans-serif;} .say_quote {font-family: Georgia, Verdana, sans-serif;}
.terminus {font-family: "Times New Roman", Times, serif, sans-serif} .terminus {font-family: "Times New Roman", Times, serif, sans-serif}
.interface {color: #330033;} .interface {color: #330033;}
.black {color: #000000;}
.darkgray {color: #808080;}
.gray {color: #A9A9A9;}
.red {color: #FF0000;}
.orange {color: #FF8C00;}
.blue {color: #0000FF;}
.green {color: #00DD00;}
.inverted .black {color: #606060;}
.inverted .darkgray {color: #808080;}
.inverted .gray {color: #A9A9A9;}
.inverted .red {color: #FF4444;}
.inverted .orange {color: #FF8C00;}
.inverted .blue {color: #6666FF;}
.inverted .green {color: #44FF44;}
/*BIG IMG.icon {width: 32px; height: 32px;}*/ /*BIG IMG.icon {width: 32px; height: 32px;}*/
img.icon {vertical-align: middle; max-height: 1em;} img.icon {vertical-align: middle; max-height: 1em;}
img.icon.bigicon {max-height: 32px;} img.icon.bigicon {max-height: 32px;}

View File

@@ -121,4 +121,13 @@ BIG IMG.icon {width: 32px; height: 32px;}
.debug_debug {color:#0000FF;} .debug_debug {color:#0000FF;}
.debug_trace {color:#888888;} .debug_trace {color:#888888;}
.black {color: #000000;}
.darkgray {color: #808080;}
.gray {color: #A9A9A9;}
.red {color: #FF0000;}
.orange {color: #FF8C00;}
.blue {color: #0000FF;}
.green {color: #00DD00;}
</style>"} </style>"}