Gives Internal Affairs PDA a Message Centcomm option. Shortens Centcomm message time as it wasn't really being abused. Formats Centcomm messages better.

This commit is contained in:
Erthilo
2013-08-27 14:24:12 +01:00
parent 55f79b3166
commit 1fd0522276
5 changed files with 39 additions and 15 deletions

View File

@@ -179,16 +179,16 @@
if("MessageCentcomm")
if(src.authenticated==2)
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
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.", "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 30 second 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)
usr << "Message transmitted."
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
usr << "\blue Message transmitted."
log_say("[key_name(usr)] has made an IA Centcomm announcement: [input]")
centcomm_message_cooldown = 1
spawn(6000)//10 minute cooldown
spawn(300)//10 minute cooldown
centcomm_message_cooldown = 0
@@ -196,16 +196,16 @@
if("MessageSyndicate")
if((src.authenticated==2) && (src.emagged))
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
usr << "\red Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] 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.", "")
if(!input || !(usr in view(1,src)))
return
Syndicate_announce(input, usr)
usr << "Message transmitted."
usr << "\blue Message transmitted."
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
centcomm_message_cooldown = 1
spawn(6000)//10 minute cooldown
spawn(300)//10 minute cooldown
centcomm_message_cooldown = 0
if("RestoreBackup")

View File

@@ -38,6 +38,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/cart = "" //A place to stick cartridge menu information
var/detonate = 1 // Can the PDA be blown up?
var/hidden = 0 // Is the PDA hidden from the PDA list?
var/centcomm_message_cooldown = 0 //Internal Affairs centcomm message cooldown
var/obj/item/weapon/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
var/ownjob = null //related to above
@@ -378,11 +379,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "</ul>"
else dat += "</ul>"
if(cartridge.access_quartermaster)
dat += "<h4>Quartermaster Functions:</h4>"
dat += "<h4>Quartermaster Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=47'><img src=pda_crate.png> Supply Records</A></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=48'><img src=pda_mule.png> Delivery Bot Control</A></li>"
dat += "</ul>"
if (cartridge.access_internalaffairs)
dat += "<h4>Internal Affairs Functions</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=Centcomm Message'><img src=pda_mail.png> Send Centcomm Message</A></li>"
dat += "</ul>"
dat += "</ul>"
dat += "<h4>Utilities</h4>"
@@ -677,6 +683,23 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
U << browse(null, "window=pda")
return
if("Centcomm Message")
if(istype(cartridge, /obj/item/weapon/cartridge/lawyer))
if(centcomm_message_cooldown)
U << "\red Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Use only as a last resort if all other avenues have been exhausted. 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.", "")
if(!input || !(usr in view(1,src)))
return
Centcomm_announce(input, usr)
U << "\blue Message transmitted."
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
centcomm_message_cooldown = 1
spawn(300)//30 seconds cooldown
centcomm_message_cooldown = 0
else
U << browse(null, "window=pda")
return
//SYNDICATE FUNCTIONS===================================

View File

@@ -14,6 +14,7 @@
var/access_clown = 0
var/access_mime = 0
var/access_janitor = 0
var/access_internalaffairs = 0
// var/access_flora = 0
var/access_reagent_scanner = 0
var/access_remote_door = 0 //Control some blast doors remotely!!
@@ -79,6 +80,7 @@
name = "P.R.O.V.E. Cartridge"
icon_state = "cart-s"
access_security = 1
access_internalaffairs = 1
clown
name = "Honkworks 5.0"
@@ -602,7 +604,6 @@ Code:
menu += "ERROR: Unable to determine current location."
menu += "<br><br><A href='byond://?src=\ref[src];choice=49'>Refresh GPS Locator</a>"
/obj/item/weapon/cartridge/Topic(href, href_list)
..()

View File

@@ -1415,7 +1415,7 @@
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 << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\""
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. <b>\"[input]\"</b> Message ends.\""
else if(href_list["SyndicateReply"])
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
@@ -1431,7 +1431,7 @@
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].")
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.\""
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. <b>\"[input]\"</b> Message ends.\""
else if(href_list["CentcommFaxView"])
var/info = locate(href_list["CentcommFaxView"])

View File

@@ -27,9 +27,9 @@
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)
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
admins << msg
/proc/Syndicate_announce(var/text , var/mob/Sender)