From 20dcedcc3d31d36ced81952439b9dc923610d669 Mon Sep 17 00:00:00 2001 From: Atermonera Date: Wed, 12 May 2021 23:59:20 -0700 Subject: [PATCH] Merge pull request #8079 from Neerti/baylike_topic Adds map name and in-round player count to Topic reply. --- code/game/world.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/world.dm b/code/game/world.dm index a51b7185de0..95d6ff18d72 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -111,8 +111,10 @@ var/world_topic_spam_protect_time = world.timeofday s["players"] = 0 s["stationtime"] = stationtime2text() s["roundduration"] = roundduration2text() + s["map"] = strip_improper(using_map.full_name) //Done to remove the non-UTF-8 text macros - if(input["status"] == "2") + if(input["status"] == "2") // Shiny new hip status. + var/active = 0 var/list/players = list() var/list/admins = list() @@ -122,15 +124,18 @@ var/world_topic_spam_protect_time = world.timeofday continue admins[C.key] = C.holder.rank players += C.key + if(istype(C.mob, /mob/living)) + active++ s["players"] = players.len s["playerlist"] = list2params(players) + s["active_players"] = active var/list/adm = get_admin_counts() var/list/presentmins = adm["present"] var/list/afkmins = adm["afk"] s["admins"] = presentmins.len + afkmins.len //equivalent to the info gotten from adminwho s["adminlist"] = list2params(admins) - else + else // Legacy. var/n = 0 var/admins = 0