From e8bb3451dbc76e147182b0e9e2ca4ce92a25ebc6 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Thu, 2 Aug 2018 02:22:02 -0400 Subject: [PATCH] Stop making Late night PRs fethas --- code/modules/admin/admin.dm | 3 +- code/modules/admin/admin_verbs.dm | 1 + code/modules/admin/topic.dm | 24 +++++++-------- code/modules/admin/verbs/randomverbs.dm | 40 +++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 13 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 051f450179b..d32d020fe0e 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -61,7 +61,8 @@ var/global/nologevent = 0 body += "PM - " body += "SM - " body += "[admin_jump_link(M)]\]
" - + if(ishuman(M) && M.mind) + body += "HM" body += "Mob type: [M.type]
" if(M.client) if(M.client.related_accounts_cid.len) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 72334496ea5..dae563c7e19 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -76,6 +76,7 @@ var/list/admin_verbs_admin = list( /client/proc/toggle_mentor_chat, /client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/ /client/proc/list_ssds, + /client/proc/cmd_admin_headset_message, ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 798185188ff..e594bbc164f 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1675,22 +1675,22 @@ if(!check_rights(R_ADMIN)) return - var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) - if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") - return - if(!istype(H.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset") + var/mob/M = locate(href_list["CentcommReply"]) + usr.client.admin_headset_message(M, "Centcomm") + + else if(href_list["SyndicateReply"]) + if(!check_rights(R_ADMIN)) return - var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via [H.p_their()] headset.","Outgoing message from Centcomm", "") - if(!input) return + var/mob/M = locate(href_list["SyndicateReply"]) + usr.client.admin_headset_message(M, "Syndicate") - to_chat(src.owner, "You sent [input] to [H] via a secure channel.") - log_admin("[key_name(src.owner)] replied to [key_name(H)]'s Centcomm message with the message [input].") - message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)]'s Centcom message with: \"[input]\"") - to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"") + else if(href_list["HeadsetMessage"]) + if(!check_rights(R_ADMIN)) + return + var/mob/M = locate(href_list["HeadsetMessage"]) + usr.client.admin_headset_message(M) else if(href_list["EvilFax"]) if(!check_rights(R_ADMIN)) return diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 9eef4331ee0..2f794dafbd0 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -141,6 +141,46 @@ message_admins("DirectNarrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg]
", 1) 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_headset_message(mob/M in mob_list) + set category = "Event" + set name = "Headset Message" + + admin_headset_message(M) + +/client/proc/admin_headset_message(mob/M in mob_list, sender = null) + 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.l_ear, /obj/item/radio/headset) && !istype(H.r_ear, /obj/item/radio/headset)) + to_chat(usr, "The person you are trying to contact is not wearing a headset") + return + + if(!sender) + sender = input("Who is the message from?", "Sender") as null|anything in list("Centcomm", "Syndicate") + if(!sender) + return + + message_admins("[key_name_admin(src)] has started answering [key_name_admin(H)]'s [sender] request.") + var/input = input("Please enter a message to reply to [key_name(H)] via their headset.", "Outgoing message from [sender]", "") as text|null + if(!input) + message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(H)]'s [sender] request.") + return + + log_admin("[key_name(src)] replied to [key_name(H)]'s [sender] message with the message [input].") + message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s [sender] 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 [sender == "Syndicate" ? "your benefactor" : "Central Command"]. Message as follows[sender == "Syndicate" ? ", agent." : ":"] [input]. Message ends.\"") + + + + /client/proc/cmd_admin_godmode(mob/M as mob in mob_list) set category = "Admin" set name = "Godmode"