mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
[MIRROR] Makes silicons able to receive headset messages from admins [MDB IGNORE] (#20239)
* Makes silicons able to receive headset messages from admins (#74387) ## About The Pull Request This just makes silicons able to receive headset messages from admins, as stated in the title. It doesn't really make sense from a technical point of view why a silicon mob should not be able to receive headset messages from admins, seeing as they have a built in radio. As long as their radio is intact they will get the message. Some testing screenshots-- it is working as intended. <details> <summary>Balloon alert still displays</summary>  </details> <details> <summary>No radio/headset still prevents message from being sent</summary>   </details> Closes https://github.com/Skyrat-SS13/Skyrat-tg/issues/14164 ## Why It's Good For The Game Fixes an oversight, more tools for admins to play with is always nice. ## Changelog 🆑 fix: admins may now send headset messages to silicon mobs as long as they have a radio /🆑 * Makes silicons able to receive headset messages from admins --------- Co-authored-by: Bloop <vinylspiders@gmail.com>
This commit is contained in:
@@ -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." : ":"] <b>[input].</b> 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." : ":"] <b>[input].</b> 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!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user