mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Merge pull request #17759 from KorPhaeron/weather_immunity
Weather Immunity Refactor
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
var/overlay_layer = 10 //This is the default area layer, and above everything else. 2 is floors/below walls and mobs.
|
||||
var/purely_aesthetic = FALSE //If we just want gentle rain that doesn't hurt people
|
||||
var/list/impacted_areas = list()
|
||||
var/immunity_type = "storm"
|
||||
|
||||
/datum/weather/proc/weather_start_up()
|
||||
for(var/area/N in get_areas(area_type))
|
||||
@@ -73,9 +74,8 @@
|
||||
|
||||
|
||||
/datum/weather/proc/storm_act(mob/living/L)
|
||||
if(prob(30)) //Dont want it spammed very tick
|
||||
L << "You're buffeted by the storm!"
|
||||
L.adjustBruteLoss(1)
|
||||
if(immunity_type in L.weather_immunities)
|
||||
return
|
||||
|
||||
/datum/weather/proc/update_areas()
|
||||
for(var/area/N in impacted_areas)
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
duration_overlay = "lava"
|
||||
overlay_layer = 2 //Covers floors only
|
||||
|
||||
immunity_type = "lava"
|
||||
|
||||
|
||||
/datum/weather/floor_is_lava/storm_act(mob/living/L)
|
||||
..()
|
||||
var/turf/F = get_turf(L)
|
||||
for(var/obj/structure/O in F.contents)
|
||||
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
|
||||
@@ -77,6 +80,8 @@
|
||||
duration_overlay = "ash_storm"
|
||||
overlay_layer = 10
|
||||
|
||||
immunity_type = "ash"
|
||||
|
||||
|
||||
/datum/weather/ash_storm/false_alarm //No storm, just light ember fall
|
||||
purely_aesthetic = TRUE
|
||||
@@ -85,8 +90,7 @@
|
||||
wind_down_message = "The ash fall starts to trail off."
|
||||
|
||||
/datum/weather/ash_storm/storm_act(mob/living/L)
|
||||
if("mining" in L.faction)
|
||||
return
|
||||
..()
|
||||
if(istype(L.loc, /obj/mecha))
|
||||
return
|
||||
if(ishuman(L))
|
||||
|
||||
Reference in New Issue
Block a user