mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Radiation storm fixes
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user