From e0b6f80912bd61d70b8a554d231373cc35bfee06 Mon Sep 17 00:00:00 2001 From: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com> Date: Wed, 23 Sep 2020 02:53:28 -0700 Subject: [PATCH] Change the "Who" verb to display a table rather than a list (#53839) Doesn't apply for active admins since those have longer lines that wouldn't fit well. --- code/modules/client/verbs/who.dm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/modules/client/verbs/who.dm b/code/modules/client/verbs/who.dm index 55ddadcd0dd..7a32f518237 100644 --- a/code/modules/client/verbs/who.dm +++ b/code/modules/client/verbs/who.dm @@ -1,3 +1,5 @@ +#define DEFAULT_WHO_CELLS_PER_ROW 4 + /client/verb/who() set name = "Who" set category = "OOC" @@ -5,9 +7,11 @@ var/msg = "Current Players:\n" var/list/Lines = list() + var/columns_per_row = DEFAULT_WHO_CELLS_PER_ROW if(holder) if (check_rights(R_ADMIN,0) && isobserver(src.mob))//If they have +ADMIN and are a ghost they can see players IC names and statuses. + columns_per_row = 1 var/mob/dead/observer/G = src.mob if(!G.started_as_observer)//If you aghost to do this, KorPhaeron will deadmin you in your sleep. log_admin("[key_name(usr)] checked advanced who in-round") @@ -50,8 +54,16 @@ else Lines += "[C.key] ([round(C.avgping, 1)]ms)" + var/num_lines = 0 + msg += "
| [line] | " + + num_lines += 1 + if (num_lines == columns_per_row) + num_lines = 0 + msg += "