Merge pull request #38482 from DaxDupont/syndicatemess

Add syndicate headset messages, squashes both together.
This commit is contained in:
Jordan Brown
2018-06-15 13:52:12 -04:00
committed by yogstation13-bot
parent d30d010c53
commit a5c00915b9
4 changed files with 30 additions and 27 deletions

View File

@@ -63,7 +63,7 @@
body += "<a href='?priv_msg=[M.ckey]'>PM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];subtlemessage=[REF(M)]'>SM</a> - "
if (ishuman(M) && M.mind)
body += "<a href='?_src_=holder;[HrefToken()];CentComReply=[REF(M)]'>CM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];HeadsetMessage=[REF(M)]'>HM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(M)]'>FLW</a> - "
//Default to client logs if available
var/source = LOGSRC_MOB

View File

@@ -41,7 +41,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_headset_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*/
@@ -186,7 +186,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_headset_message,
/client/proc/cmd_admin_check_contents,
/datum/admins/proc/access_news_network,
/client/proc/admin_call_shuttle,

View File

@@ -1817,27 +1817,21 @@
return
var/mob/M = locate(href_list["CentComReply"])
cmd_admin_centcom_message(M)
usr.client.admin_headset_message(M, "CentCom")
else if(href_list["SyndicateReply"])
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
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 syndicate request.")
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "")
if(!input)
message_admins("[src.owner] decided not to answer [key_name(H)]'s syndicate request.")
var/mob/M = locate(href_list["SyndicateReply"])
usr.client.admin_headset_message(M, "Syndicate")
else if(href_list["HeadsetMessage"])
if(!check_rights(R_ADMIN))
return
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
message_admins("[src.owner] replied to [key_name(H)]'s Syndicate 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 your benefactor. Message as follows, agent. [input]. Message ends.\"")
var/mob/M = locate(href_list["HeadsetMessage"])
usr.client.admin_headset_message(M)
else if(href_list["reject_custom_name"])
if(!check_rights(R_ADMIN))

View File

@@ -45,9 +45,13 @@
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)
/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "CentCom Message"
set name = "Headset Message"
admin_headset_message(M)
/client/proc/admin_headset_message(mob/M in GLOB.mob_list, sender = null)
var/mob/living/carbon/human/H = M
if(!check_rights(R_ADMIN))
@@ -60,17 +64,22 @@
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 (!sender)
sender = input("Who is the message from?", "Sender") as null|anything in list("CentCom","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 CentCom request.")
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 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: <span class='bold'>[input].</span> Message ends.\"")
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." : ":"] <span class='bold'>[input].</span> 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!
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!
/client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, var/operation)
set category = "Special Verbs"