Files
Bubberstation/code/modules/events/prison_break.dm
ikarrus a48ba0d256 Priority Announcement Changes
-Centcom announcement proc merged with generic priority announcement proc
-Re-added the Captain Announces accompanied by a new pleasant sound, instead of the generic priority announcement
-Captain Announcements will automatically generate a newscaster article
-Priority announcements without any defined accompanying sound will play a generic "Attention" soundbyte as an audio cue
-Communications consoles will display who is currently logged in
2014-05-05 22:18:57 -06:00

52 lines
1.7 KiB
Plaintext

/datum/round_event_control/prison_break
name = "Prison Break"
typepath = /datum/round_event/prison_break
max_occurrences = 2
/datum/round_event/prison_break
announceWhen = 50
endWhen = 20
var/list/area/prisonAreas = list()
/datum/round_event/prison_break/setup()
announceWhen = rand(50, 60)
endWhen = rand(20, 30)
for(var/area/security/A in world)
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
prisonAreas += A
/datum/round_event/prison_break/announce()
if(prisonAreas && prisonAreas.len > 0)
priority_announce("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
kill()
/datum/round_event/prison_break/start()
for(var/area/A in prisonAreas)
for(var/obj/machinery/light/L in A)
L.flicker(10)
/datum/round_event/prison_break/end()
for(var/area/A in prisonAreas)
for(var/obj/O in A)
if(istype(O,/obj/machinery/power/apc))
var/obj/machinery/power/apc/temp = O
temp.overload_lighting()
else if(istype(O,/obj/structure/closet/secure_closet/brig))
var/obj/structure/closet/secure_closet/brig/temp = O
temp.locked = 0
temp.icon_state = temp.icon_closed
else if(istype(O,/obj/machinery/door/airlock/security))
var/obj/machinery/door/airlock/security/temp = O
temp.prison_open()
else if(istype(O,/obj/machinery/door/airlock/glass_security))
var/obj/machinery/door/airlock/glass_security/temp = O
temp.prison_open()
else if(istype(O,/obj/machinery/door_timer))
var/obj/machinery/door_timer/temp = O
temp.releasetime = 1