Skip to content

Commit

Permalink
Narrate to ground level
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Nov 17, 2023
1 parent 5ad6fd8 commit ca4ef43
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 22 additions & 0 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca4ef43

Please sign in to comment.