From 973683b8bf5eb33ca408214885b3e25b2b8876ed Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Mon, 6 Jul 2015 23:22:01 +1000 Subject: [PATCH 1/2] local narrate verb --- code/modules/admin/admin_verbs.dm | 2 ++ code/modules/admin/verbs/randomverbs.dm | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 23e0bc6142e..4f157aadda7 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -57,6 +57,7 @@ var/list/admin_verbs_admin = list( /client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcom*/ /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ + /client/proc/cmd_admin_local_narrate, //sends text to all mobs within view of atmo /client/proc/cmd_admin_create_centcom_report, /client/proc/check_words, /*displays cult-words*/ /client/proc/reset_all_tcs /*resets all telecomms scripts*/ @@ -163,6 +164,7 @@ var/list/admin_verbs_hideable = list( /client/proc/admin_cancel_shuttle, /client/proc/cmd_admin_direct_narrate, /client/proc/cmd_admin_world_narrate, + /client/proc/cmd_admin_local_narrate, /client/proc/check_words, /client/proc/play_local_sound, /client/proc/play_sound, diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 57bea51a682..0e37c270f71 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -82,6 +82,25 @@ message_admins(" DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
") feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/proc/cmd_admin_local_narrate(var/atom/A) + set category = "Special Verbs" + set name = "Local Narrate" + + if (!holder) + src << "Only administrators may use this command." + return + if(!A) + return + var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text + if (!msg) + return + for(var/mob/living/M in view(7,A)) + M << msg + + log_admin("LocalNarrate: [key_name(usr)] at ([get_area(A)]): [msg]") + message_admins(" LocalNarrate: [key_name_admin(usr)] at ([get_area(A)]): [msg]
") + feedback_add_details("admin_verb","LN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + /client/proc/cmd_admin_godmode(mob/M as mob in mob_list) set category = "Special Verbs" set name = "Godmode" From 52acb19a555e27d5b302bf028e5750f80fcee5e0 Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Mon, 6 Jul 2015 23:46:21 +1000 Subject: [PATCH 2/2] custom range and changelog --- code/modules/admin/verbs/randomverbs.dm | 5 ++++- html/changelogs/jordie ln.yml | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/jordie ln.yml diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 0e37c270f71..602382d5e52 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -91,10 +91,13 @@ return if(!A) return + var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num + if(!range) + return var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text if (!msg) return - for(var/mob/living/M in view(7,A)) + for(var/mob/living/M in view(range,A)) M << msg log_admin("LocalNarrate: [key_name(usr)] at ([get_area(A)]): [msg]") diff --git a/html/changelogs/jordie ln.yml b/html/changelogs/jordie ln.yml new file mode 100644 index 00000000000..31ccda78706 --- /dev/null +++ b/html/changelogs/jordie ln.yml @@ -0,0 +1,6 @@ +author: Jordie0608 + +delete-after: True + +changes: + - rscadd: "Added a Local Narrate verb for admins."