From fd2bd8459f8d674f16c507b6b1e16a3da60867fa Mon Sep 17 00:00:00 2001 From: "VivianFoxfoot@gmail.com" Date: Sat, 7 Jan 2012 00:05:01 +0000 Subject: [PATCH] Adds the ability for the Communications Console to send emergency messages to Centcomm (or, when emagged, to the Syndicate.) This messages admins in the same fashion as a prayer. Adds a button to the messages that admins receive from Syndiate/Centcomm messages called 'BSA' and hits the target with bluespace artillery if the message was suitably stupid. Because of the IC act of sending the message as opposed to prayer, does not respect see_prayers. Depending on (ab)use, may be changed git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2921 316c924e-a436-60f5-8080-3fe189b3f50e --- .../game/machinery/computer/communications.dm | 56 +++++++++++++++++++ code/modules/admin/admin.dm | 23 ++++++++ code/modules/admin/verbs/pray.dm | 19 +++++++ 3 files changed, 98 insertions(+) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 8ab7c23320..6d29498392 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -14,6 +14,7 @@ var/state = STATE_DEFAULT var/aistate = STATE_DEFAULT var/message_cooldown = 0 + var/centcomm_message_cooldown = 0 var/tmp_alertlevel = 0 var/const STATE_DEFAULT = 1 @@ -31,6 +32,7 @@ var/stat_msg2 + /obj/machinery/computer/communications/process() ..() if(state != STATE_STATUSDISPLAY) @@ -168,6 +170,46 @@ stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null src.updateDialog() + // OMG CENTCOMM LETTERHEAD + if("MessageCentcomm") + if(src.authenticated==2) + if(centcomm_message_cooldown) + usr << "Arrays recycling. Please stand by." + return + var/input = 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.", "") + 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]") + centcomm_message_cooldown = 1 + spawn(600)//One minute cooldown + message_cooldown = 0 + + + // OMG SYNDICATE ...LETTERHEAD + if("MessageSyndicate") + if((src.authenticated==2) && (src.emagged)) + if(centcomm_message_cooldown) + usr << "Arrays recycling. Please stand by." + return + var/input = 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.", "") + if(!input || !(usr in view(1,src))) + return + Syndicate_announce(input, usr) + usr << "Message transmitted." + log_say("[key_name(usr)] has made a Syndicate announcement: [input]") + centcomm_message_cooldown = 1 + spawn(600)//One minute cooldown + message_cooldown = 0 + + if("RestoreBackup") + usr << "Backup routing data restored!" + src.emagged = 0 + src.updateDialog() + + + // AI interface if("ai-main") src.aicurrmsg = 0 @@ -214,6 +256,11 @@ src.updateUsrDialog() +/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob) + if(istype(I,/obj/item/weapon/card/emag/)) + src.emagged = 1 + user << "You scramble the communication routing circuits!" + ..() /obj/machinery/computer/communications/attack_ai(var/mob/user as mob) return src.attack_hand(user) @@ -247,6 +294,12 @@ dat += "
\[ Log Out \]" if (src.authenticated==2) dat += "
\[ Make An Announcement \]" + if(src.emagged == 0) + dat += "
\[ Send an emergancy message to Centcomm \]" + else + dat += "
\[ Send an emergancy message to \[UNKNOWN\] \]" + dat += "
\[ Restore Backup Routing Data \]" + dat += "
\[ Change alert level \]" if(emergency_shuttle.location==0) if (emergency_shuttle.online) @@ -309,6 +362,9 @@ user << browse(dat, "window=communications;size=400x500") onclose(user, "communications") + + + /obj/machinery/computer/communications/proc/interact_ai(var/mob/living/silicon/ai/user as mob) var/dat = "" switch(src.aistate) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index a8c3bc4f37..fefe2255f8 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -826,6 +826,29 @@ sleep(2) cl.jumptomob(M) + if (href_list["BlueSpaceArtillery"]) + var/mob/M = locate(href_list["BlueSpaceArtillery"]) + M << "You've been hit by bluespace artillery!" + + var/obj/effect/stop/S + S = new /obj/effect/stop + S.victim = M + S.loc = M.loc + spawn(20) + del(S) + + var/turf/T = get_turf(M) + if(T) + T.ex_act(2) + + if(M.health == 1) + M.gib() + else + M.adjustBruteLoss( min( 99 , (M.health - 1) ) ) + M.Stun(20) + M.Weaken(20) + M.stuttering = 20 + if (href_list["jumpto"]) if(rank in list("Badmin", "Game Admin", "Game Master")) diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 303779597a..6f0a925218 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -21,3 +21,22 @@ usr << "Your prayers have been received by the gods." //log_admin("HELP: [key_name(src)]: [msg]") + + +/proc/Centcomm_announce(var/text , var/mob/Sender) + + var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN) + + + for (var/mob/M in world) + if (M.client && M.client.holder) + M << "\blue CENTCOMM:[key_name(Sender, M)] (PP) (VV) (SM) (JMP) (CA) (BSA): [msg]" + +/proc/Syndicate_announce(var/text , var/mob/Sender) + + var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN) + + for (var/mob/M in world) + if (M.client && M.client.holder) + M << "\blue SYNDICATE:[key_name(Sender, M)] (PP) (VV) (SM) (JMP) (CA) (BSA): [msg]" +