Radiation storm fixes

This commit is contained in:
ZomgPonies
2013-10-29 01:28:42 -04:00
parent 7d8da26892
commit 7b3f4dad39
2 changed files with 25 additions and 7 deletions
+5
View File
@@ -2032,6 +2032,11 @@
feedback_add_details("admin_secrets_fun_used","PB")
message_admins("[key_name_admin(usr)] has allowed a prison break", 1)
prison_break()
if("radiation")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RAD")
message_admins("[key_name_admin(usr)] has started a radiation event", 1)
new /datum/event/radiation_storm
if("lightout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LO")
+20 -7
View File
@@ -1,18 +1,33 @@
/datum/event/radiation_storm
announceWhen = 1
oneShot = 1
var/safe_zones = list(
/area/maintenance,
/area/crew_quarters/sleep,
/area/security/brig,
/area/shuttle,
/area/vox_station,
/area/syndicate_station
)
/datum/event/radiation_storm/announce()
// Don't do anything, we want to pack the announcement with the actual event
/datum/event/radiation_storm/proc/is_safe_zone(var/area/A)
for(var/szt in safe_zones)
if(istype(A, szt))
return 1
return 0
/datum/event/radiation_storm/start()
spawn()
world << sound('sound/AI/radiation.ogg')
command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert")
for(var/area/A in the_station_areas)
if(istype(A, /area/maintenance) || istype(A, /area/crew_quarters) || istype(A, /area/security/prison) || istype(A, /area/security/brig))
for(var/area/A in world)
if(A.z != 1 || is_safe_zone(A))
continue
A.radiation_alert()
@@ -29,9 +44,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
if(T.z != 1)
continue
if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
if(T.z != 1 || is_safe_zone(T.loc))
continue
if(istype(H,/mob/living/carbon/human))
@@ -58,8 +71,8 @@
command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
for(var/area/A in the_station_areas)
if(istype(A, /area/maintenance) || istype(A, /area/crew_quarters) || istype(A, /area/security/prison) || istype(A, /area/security/brig))
for(var/area/A in world)
if(A.z != 1 || is_safe_zone(A))
continue
A.reset_radiation_alert()