From da5ede5ff7cea44bd32d94347c11af4809fc51f6 Mon Sep 17 00:00:00 2001 From: Dax Dupont Date: Thu, 14 Jun 2018 09:23:44 +0200 Subject: [PATCH] Admins can now send CentCom messages as an alternative to SMs (#38401) * Admins can now send CentCom messages as an alternative to SMs for a more ICly feel. * aaaa * oh shit its easy * aaa --- code/modules/admin/admin.dm | 2 ++ code/modules/admin/admin_verbs.dm | 2 ++ code/modules/admin/topic.dm | 18 +++-------------- code/modules/admin/verbs/randomverbs.dm | 27 +++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 8ffeece57ee..6865e36ac6e 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -62,6 +62,8 @@ body += "BP - " body += "PM - " body += "SM - " + if (ishuman(M) && M.mind) + body += "CM - " body += "FLW - " //Default to client logs if available var/source = LOGSRC_MOB diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index d5f32534ead..ab17d4326fd 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -40,6 +40,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin()) /client/proc/getserverlogs, /*for accessing server logs*/ /client/proc/getcurrentlogs, /*for accessing server logs for the current round*/ /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ + /datum/admins/proc/cmd_admin_centcom_message, /*send an message to somebody through their headset as CentCom*/ /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ /client/proc/check_antagonists, /*shows all antags*/ @@ -180,6 +181,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( /client/proc/admin_ghost, /client/proc/toggle_view_range, /client/proc/cmd_admin_subtle_message, + /datum/admins/proc/cmd_admin_centcom_message, /client/proc/cmd_admin_check_contents, /datum/admins/proc/access_news_network, /client/proc/admin_call_shuttle, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index fe2b5208f0e..194f09a2ed3 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1813,23 +1813,11 @@ usr.client.smite(H) else if(href_list["CentComReply"]) - var/mob/living/carbon/human/H = locate(href_list["CentComReply"]) in GLOB.mob_list - if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") - return - if(!istype(H.ears, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset.") + if(!check_rights(R_ADMIN)) return - message_admins("[src.owner] has started answering [key_name(H)]'s CentCom request.") - var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from CentCom", "") - if(!input) - message_admins("[src.owner] decided not to answer [key_name(H)]'s CentCom request.") - return - - log_admin("[src.owner] replied to [key_name(H)]'s CentCom message with the message [input].") - message_admins("[src.owner] replied to [key_name(H)]'s CentCom message with: \"[input]\"") - to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"") + var/mob/M = locate(href_list["CentComReply"]) + cmd_admin_centcom_message(M) else if(href_list["SyndicateReply"]) var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"]) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e402402730e..a9d8eb72363 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -45,6 +45,33 @@ admin_ticket_log(M, msg) SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/datum/admins/proc/cmd_admin_centcom_message(mob/M in GLOB.mob_list) + set category = "Special Verbs" + set name = "CentCom Message" + var/mob/living/carbon/human/H = M + + if(!check_rights(R_ADMIN)) + return + + if(!istype(H)) + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + return + if(!istype(H.ears, /obj/item/radio/headset)) + to_chat(usr, "The person you are trying to contact is not wearing a headset.") + return + + message_admins("[key_name_admin(src)] has started answering [key_name_admin(H)]'s CentCom request.") + var/input = input("Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from CentCom", "") as text|null + if(!input) + message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(H)]'s CentCom request.") + return + + log_admin("[key_name(src)] replied to [key_name(H)]'s CentCom message with the message [input].") + message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s CentCom message with: \"[input]\"") + to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows: [input]. Message ends.\"") + + SSblackbox.record_feedback("tally", "admin_verb", 1, "CentCom Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + /client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, var/operation) set category = "Special Verbs" set name = "Modify Antagonist Reputation"