mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Changes radiation storm random event into a weather type.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
var/area_type = /area/space //Types of area to affect
|
||||
var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins
|
||||
var/list/protected_areas = list()//Areas that are protected and excluded from the affected areas.
|
||||
var/target_z = ZLEVEL_STATION //The z-level to affect
|
||||
|
||||
var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
@@ -50,7 +51,12 @@
|
||||
if(stage == STARTUP_STAGE)
|
||||
return
|
||||
stage = STARTUP_STAGE
|
||||
var/list/affectareas = list()
|
||||
for(var/V in get_areas(area_type))
|
||||
affectareas += V
|
||||
for(var/V in protected_areas)
|
||||
affectareas -= get_areas(V)
|
||||
for(var/V in affectareas)
|
||||
var/area/A = V
|
||||
if(A.z == target_z)
|
||||
impacted_areas |= A
|
||||
@@ -97,7 +103,7 @@
|
||||
|
||||
/datum/weather/proc/end()
|
||||
if(stage == END_STAGE)
|
||||
return
|
||||
return 1
|
||||
stage = END_STAGE
|
||||
update_areas()
|
||||
|
||||
|
||||
@@ -113,3 +113,50 @@
|
||||
aesthetic = TRUE
|
||||
|
||||
probability = 10
|
||||
|
||||
/datum/weather/rad_storm
|
||||
name = "radiation storm"
|
||||
desc = "A cloud of intense radiation passes through the area dealing rad damage to those who are unprotected."
|
||||
|
||||
//telegraph_message = "<span class='boldwarning'>An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter.</span>"
|
||||
telegraph_duration = 300
|
||||
telegraph_sound = 'sound/lavaland/ash_storm_windup.ogg'
|
||||
telegraph_overlay = "light_ash"
|
||||
|
||||
//weather_message = "<span class='userdanger'><i>Smoldering clouds of scorching ash billow down around you! Get inside!</i></span>"
|
||||
weather_duration_lower = 600
|
||||
weather_duration_upper = 1500
|
||||
weather_sound = 'sound/lavaland/ash_storm_start.ogg'
|
||||
weather_overlay = "ash_storm"
|
||||
|
||||
//end_message = "<span class='boldannounce'>The shrieking wind whips away the last of the ash falls to its usual murmur. It should be safe to go outside now.</span>"
|
||||
end_duration = 300
|
||||
end_sound = 'sound/lavaland/ash_storm_end.ogg'
|
||||
end_overlay = "light_ash"
|
||||
|
||||
area_type = /area
|
||||
protected_areas = list(/area/maintenance, /area/turret_protected/ai_upload, /area/turret_protected/ai_upload_foyer, /area/turret_protected/ai)
|
||||
target_z = ZLEVEL_STATION
|
||||
|
||||
immunity_type = "rad"
|
||||
|
||||
/datum/weather/rad_storm/impact(mob/living/L)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna && H.dna.species)
|
||||
if(!(RADIMMUNE in H.dna.species.specflags))
|
||||
if(prob(25))
|
||||
if(prob(25))
|
||||
randmuti(H)
|
||||
if(prob(90))
|
||||
randmutb(H)
|
||||
else
|
||||
randmutg(H)
|
||||
H.domutcheck()
|
||||
L.rad_act(15,1)
|
||||
|
||||
/datum/weather/rad_storm/end()
|
||||
if(..())
|
||||
return
|
||||
priority_announce("The radiation threat has passed. Please return to your workplaces. Maintenance access restrictions will be restored shortly.", "Anomaly Alert")
|
||||
addtimer(GLOBAL_PROC, "revoke_maint_all_access", 300, TRUE)
|
||||
Reference in New Issue
Block a user