diff --git a/code/modules/admin/verbs/adminevents.dm b/code/modules/admin/verbs/adminevents.dm index 179cf2d2657..3197554062c 100644 --- a/code/modules/admin/verbs/adminevents.dm +++ b/code/modules/admin/verbs/adminevents.dm @@ -33,17 +33,26 @@ admin_headset_message(M) -/client/proc/admin_headset_message(mob/M in GLOB.mob_list, sender = null) - var/mob/living/carbon/human/H = M +/client/proc/admin_headset_message(mob/target in GLOB.mob_list, sender = null) + var/mob/living/carbon/human/human_recipient + var/mob/living/silicon/silicon_recipient 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", confidential = TRUE) - return - if(!istype(H.ears, /obj/item/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset.", confidential = TRUE) + + if(ishuman(target)) + human_recipient = target + if(!istype(human_recipient.ears, /obj/item/radio/headset)) + to_chat(usr, "The person you are trying to contact is not wearing a headset.", confidential = TRUE) + return + else if(issilicon(target)) + silicon_recipient = target + if(!istype(silicon_recipient.radio, /obj/item/radio)) + to_chat(usr, "The silicon you are trying to contact does not have a radio installed.", confidential = TRUE) + return + else + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human or /mob/living/silicon", confidential = TRUE) return if (!sender) @@ -51,16 +60,16 @@ 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 + message_admins("[key_name_admin(src)] has started answering [key_name_admin(target)]'s [sender] request.") + var/input = input("Please enter a message to reply to [key_name(target)] 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.") + message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(target)]'s [sender] request.") return - log_directed_talk(mob, H, input, LOG_ADMIN, "reply") - message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s [sender] message with: \"[input]\"") - H.balloon_alert(H, "you hear a voice") - to_chat(H, span_hear("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.\""), confidential = TRUE) + log_directed_talk(mob, target, input, LOG_ADMIN, "reply") + message_admins("[key_name_admin(src)] replied to [key_name_admin(target)]'s [sender] message with: \"[input]\"") + target.balloon_alert(target, "you hear a voice") + to_chat(target, span_hear("You hear something crackle in your [human_recipient ? "ears" : "radio receiver"] 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.\""), confidential = TRUE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Headset Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!