From ca4ef43211bd5f3b6e478434ee972ce56cfe52bb Mon Sep 17 00:00:00 2001 From: Morrow Date: Fri, 17 Nov 2023 00:00:56 -0500 Subject: [PATCH] Narrate to ground level --- code/modules/admin/admin_verbs.dm | 1 + code/modules/admin/tabs/event_tab.dm | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 62ef154b7f..c60555cb4e 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -115,6 +115,7 @@ var/list/admin_verbs_minor_event = list( /datum/admins/proc/force_predator_round, //Force spawns a predator round. /client/proc/adjust_predator_round, /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ + /client/proc/cmd_admin_ground_narrate, /client/proc/cmd_admin_atom_narrate, /client/proc/cmd_admin_create_centcom_report, //Messages from USCM command/other factions. /client/proc/cmd_admin_create_predator_report, //Predator ship AI report diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 9ff030d0f1..a46ff34e3e 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -660,6 +660,28 @@ to_chat_spaced(world, html = SPAN_ANNOUNCEMENT_HEADER_BLUE(msg)) message_admins("\bold GlobalNarrate: [key_name_admin(usr)] : [msg]") +/client/proc/cmd_admin_ground_narrate() + set name = "Narrate to Ground Levels" + set category = "Admin.Events" + + if(!admin_holder || !(admin_holder.rights & R_MOD)) + to_chat(src, "Only administrators may use this command.") + return + + var/msg = tgui_input_text(usr, "Enter the text you wish to appear to everyone", "Message", multiline = TRUE) + + if(!msg) + return + + var/list/all_clients = GLOB.clients.Copy() + + for(var/client/cycled_client as anything in all_clients) + if(!(cycled_client.mob?.z in SSmapping.levels_by_trait(ZTRAIT_GROUND))) + continue + + to_chat_spaced(cycled_client, html = SPAN_ANNOUNCEMENT_HEADER_BLUE(msg)) + + message_admins("\bold GroundNarrate: [key_name_admin(usr)] : [msg]") /client var/remote_control = FALSE