From b4edde2c0add88b2ac3ea08a1acb17c77bc1e318 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Fri, 15 Jun 2018 13:52:12 -0400 Subject: [PATCH 1/5] Add syndicate headset messages, squashes both together. --- code/modules/admin/admin.dm | 5 ++++ code/modules/admin/admin_verbs.dm | 8 +++++ code/modules/admin/topic.dm | 27 +++++++++-------- code/modules/admin/verbs/randomverbs.dm | 39 +++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 14 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 3d7ecb209d..fc0cf2aa6d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -62,6 +62,11 @@ body += "BP - " body += "PM - " body += "SM - " +<<<<<<< HEAD +======= + if (ishuman(M) && M.mind) + body += "HM - " +>>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess 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 4ecdc00a48..9860aa136c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -34,6 +34,10 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin()) /client/proc/toggle_view_range, /*changes how far we can see*/ /client/proc/getserverlogs, /*for accessing server logs*/ /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ +<<<<<<< HEAD +======= + /client/proc/cmd_admin_headset_message, /*send an message to somebody through their headset as CentCom*/ +>>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess /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*/ @@ -183,6 +187,10 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( /client/proc/admin_ghost, /client/proc/toggle_view_range, /client/proc/cmd_admin_subtle_message, +<<<<<<< HEAD +======= + /client/proc/cmd_admin_headset_message, +>>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess /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 0eacdd5c5e..e877d048dc 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1829,29 +1829,28 @@ message_admins("[src.owner] decided not to answer [key_name(H)]'s CentCom request.") return +<<<<<<< HEAD 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"]) + usr.client.admin_headset_message(M, "CentCom") +>>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess 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)) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e402402730..8aba7e8ba2 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -45,6 +45,45 @@ 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! +<<<<<<< HEAD +======= +/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list) + set category = "Special Verbs" + 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)) + 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 + + 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 [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.\"") + + 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! + +>>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess /client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, var/operation) set category = "Special Verbs" set name = "Modify Antagonist Reputation" From 7f6f8eb21f516e2c35b318130aea9885655baf7b Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sat, 16 Jun 2018 16:43:23 -0500 Subject: [PATCH 2/5] Update admin.dm --- code/modules/admin/admin.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index fc0cf2aa6d..8cce9bc4f4 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -62,11 +62,8 @@ body += "BP - " body += "PM - " body += "SM - " -<<<<<<< HEAD -======= if (ishuman(M) && M.mind) body += "HM - " ->>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess body += "FLW - " //Default to client logs if available var/source = LOGSRC_MOB From 68d33c79deb3323c9c36630cea231cd4aeebfea0 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sat, 16 Jun 2018 16:43:48 -0500 Subject: [PATCH 3/5] Update admin_verbs.dm --- code/modules/admin/admin_verbs.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 9860aa136c..21642784a3 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -34,10 +34,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin()) /client/proc/toggle_view_range, /*changes how far we can see*/ /client/proc/getserverlogs, /*for accessing server logs*/ /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ -<<<<<<< HEAD -======= /client/proc/cmd_admin_headset_message, /*send an message to somebody through their headset as CentCom*/ ->>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess /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*/ @@ -187,10 +184,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( /client/proc/admin_ghost, /client/proc/toggle_view_range, /client/proc/cmd_admin_subtle_message, -<<<<<<< HEAD -======= /client/proc/cmd_admin_headset_message, ->>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess /client/proc/cmd_admin_check_contents, /datum/admins/proc/access_news_network, /client/proc/admin_call_shuttle, From 162b827033711500bd88f0578866533465535c37 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sat, 16 Jun 2018 16:44:42 -0500 Subject: [PATCH 4/5] Update topic.dm --- code/modules/admin/topic.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index e877d048dc..0a4a857b19 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1829,14 +1829,8 @@ message_admins("[src.owner] decided not to answer [key_name(H)]'s CentCom request.") return -<<<<<<< HEAD - 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"]) usr.client.admin_headset_message(M, "CentCom") ->>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess else if(href_list["SyndicateReply"]) if(!check_rights(R_ADMIN)) From 98f6e8def0077f92be3ac50151bec2a8752e578f Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sat, 16 Jun 2018 16:47:19 -0500 Subject: [PATCH 5/5] Update randomverbs.dm --- code/modules/admin/verbs/randomverbs.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 8aba7e8ba2..e8afe623ee 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -45,8 +45,6 @@ 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! -<<<<<<< HEAD -======= /client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list) set category = "Special Verbs" set name = "Headset Message" @@ -83,7 +81,6 @@ 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! ->>>>>>> 78e7c5f... Merge pull request #38482 from DaxDupont/syndicatemess /client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, var/operation) set category = "Special Verbs" set name = "Modify Antagonist Reputation"