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
This commit is contained in:
VivianFoxfoot@gmail.com
2012-01-07 00:05:01 +00:00
parent 09c4db8978
commit fd2bd8459f
3 changed files with 98 additions and 0 deletions

View File

@@ -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 += "<BR>\[ <A HREF='?src=\ref[src];operation=logout'>Log Out</A> \]"
if (src.authenticated==2)
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=announce'>Make An Announcement</A> \]"
if(src.emagged == 0)
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageCentcomm'>Send an emergancy message to Centcomm</A> \]"
else
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=MessageSyndicate'>Send an emergancy message to \[UNKNOWN\]</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=RestoreBackup'>Restore Backup Routing Data</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=changeseclevel'>Change alert level</A> \]"
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)

View File

@@ -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"))

View File

@@ -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 <b><font color=orange>CENTCOMM:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>):</b> [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 <b><font color=crimson>SYNDICATE:</font>[key_name(Sender, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[Sender]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>) (<A HREF='?src=\ref[M.client.holder];BlueSpaceArtillery=\ref[Sender]'>BSA</A>):</b> [msg]"