From 16974b0c7b897c7aee83736a04591be0453405a2 Mon Sep 17 00:00:00 2001 From: SoundScopes Date: Tue, 16 Sep 2014 16:42:30 +0100 Subject: [PATCH] Cencomm Message - 10 minute cooldown - Admins can now reply - AI's send their message through Alice. --- code/modules/admin/topic.dm | 14 ++++++++++++++ code/modules/admin/verbs/pray.dm | 8 ++++++-- code/modules/mob/living/silicon/ai/ai.dm | 6 +++--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 5779bc7f..0962598b 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1470,6 +1470,20 @@ log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].") H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. \"[input]\" Message ends.\"" + else if(href_list["CentcommAIReply"]) + var/mob/living/silicon/ai/H = locate(href_list["CentcommAIReply"]) + if(!istype(H)) + usr << "This can only be used on instances of type /mob/living/silicon" + return + + var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via encripted.","Outgoing message from Central Command", "") + if(!input) return + + src.owner << "You sent [input] to [H] via a secure channel." + log_admin("[src.owner] replied to [key_name(H)]'s Centcomm message with the message [input].") + message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"") + H << "An encripted connection was made and a file was uploaded to your systems. \"Please stand by for a message from Central Command. Message as follows. \"[input]\" Message ends.\"" + else if(href_list["CentcommFaxView"]) var/info = locate(href_list["CentcommFaxView"]) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index c183b4d6..7b214020 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -27,9 +27,13 @@ feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //log_admin("HELP: [key_name(src)]: [msg]") -/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage) +//Stealing the second var because why not) +/proc/Centcomm_announce(var/text , var/mob/Sender , var/silicon = 0 , var/iamessage) var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN) - msg = "\blue CENTCOMM[iamessage ? " IA" : ""]:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" + if(silicon) + msg = "\blue CENTCOMM(A.L.I.C.E.):[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" + else + msg = "\blue CENTCOMM[iamessage ? " IA" : ""]:[key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (BSA) (RPLY): [msg]" for(var/client/C in admins) if((R_ADMIN & C.holder.rights) || (R_MOD & C.holder.rights)) C << msg diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 4b684828..00c72af6 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -747,12 +747,12 @@ var/list/ai_list = list() if(centcomm_message_cooldown) usr << "\red Arrays recycling. Please stand by." return - var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") + var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 10 minute delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") if(!input || !(usr in view(1,src))) return - Centcomm_announce(input, usr) + Centcomm_announce(input, usr, 1) usr << "\blue Message transmitted." log_say("[key_name(usr)] has made an IA Centcomm announcement: [input]") centcomm_message_cooldown = 1 - spawn(300)//10 minute cooldown + spawn(6000)//10 minute cooldown centcomm_message_cooldown = 0