mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
* SSatlas.current_map * hardsuit spell tab appears to clear correctly * sdfsa * from the moment i understood the weakness of my flesh, it disgusted me * sdf
68 lines
2.1 KiB
Plaintext
68 lines
2.1 KiB
Plaintext
/datum/event/radiation_storm
|
|
var/const/enterBelt = 45
|
|
var/const/radIntervall = 5 // 20 ticks
|
|
var/const/leaveBelt = 145
|
|
var/const/revokeAccess = 220
|
|
has_skybox_image = TRUE
|
|
startWhen = 2
|
|
announceWhen = 1
|
|
endWhen = revokeAccess
|
|
var/postStartTicks = 0
|
|
two_part = 1
|
|
ic_name = "radiation"
|
|
|
|
/datum/event/radiation_storm/get_skybox_image()
|
|
if(prob(75)) // Sometimes, give no skybox image, to avoid metagaming it
|
|
var/image/res = overlay_image('icons/skybox/radbox.dmi', "beam", null, RESET_COLOR)
|
|
res.alpha = rand(40,80)
|
|
return res
|
|
|
|
/datum/event/radiation_storm/announce()
|
|
command_announcement.Announce(SSatlas.current_map.radiation_detected_message, "Radiation Sensor Array Automated Alert", new_sound = 'sound/AI/radiation_detected_message.ogg', zlevels = affecting_z)
|
|
|
|
/datum/event/radiation_storm/start()
|
|
..()
|
|
make_maint_all_access()
|
|
lights(TRUE)
|
|
|
|
/datum/event/radiation_storm/tick()
|
|
if(activeFor == enterBelt)
|
|
command_announcement.Announce(SSatlas.current_map.radiation_contact_message, "Radiation Sensor Array Automated Alert", new_sound = 'sound/AI/radiation_contact_message.ogg', zlevels = affecting_z)
|
|
radiate()
|
|
|
|
if(activeFor >= enterBelt && activeFor <= leaveBelt)
|
|
postStartTicks++
|
|
|
|
if(postStartTicks == radIntervall)
|
|
postStartTicks = 0
|
|
radiate()
|
|
|
|
else if(activeFor == leaveBelt)
|
|
command_announcement.Announce(SSatlas.current_map.radiation_end_message, "Radiation Sensor Array Automated Alert", new_sound = 'sound/AI/radiation_end_message.ogg', zlevels = affecting_z)
|
|
lights()
|
|
|
|
/datum/event/radiation_storm/proc/radiate()
|
|
var/radiation_level = rand(20, 40)
|
|
for(var/z in affecting_z)
|
|
SSradiation.z_radiate(locate(1, 1, z), radiation_level, TRUE)
|
|
|
|
/datum/event/radiation_storm/end(var/faked)
|
|
..()
|
|
if(faked)
|
|
return
|
|
lights()
|
|
revoke_maint_all_access()
|
|
|
|
/datum/event/radiation_storm/syndicate/radiate()
|
|
return
|
|
|
|
/datum/event/radiation_storm/proc/lights(var/turnOn = FALSE)
|
|
for(var/area/A in GLOB.all_areas)
|
|
if(A.area_flags & AREA_FLAG_RAD_SHIELDED)
|
|
continue
|
|
if(turnOn)
|
|
A.radiation_active = TRUE
|
|
else
|
|
A.radiation_active = null
|
|
A.update_icon()
|