From a1c41c461a4f9f30d8793150c0d54ad1c07cd245 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 28 Jul 2017 18:50:53 -0500 Subject: [PATCH] Ashstorms Matryoshka bugfix (#2167) --- code/datums/weather/weather_types.dm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm index 0c76b8f721..d23bf3c8a6 100644 --- a/code/datums/weather/weather_types.dm +++ b/code/datums/weather/weather_types.dm @@ -91,14 +91,21 @@ probability = 90 -/datum/weather/ash_storm/impact(mob/living/L) - if(istype(L.loc, /obj/mecha)) - return - if(ishuman(L)) +/datum/weather/ash_storm/proc/is_ash_immune(mob/living/L) + if(istype(L.loc, /obj/mecha)) //Mechs are immune + return TRUE + if(ishuman(L)) //Are you immune? var/mob/living/carbon/human/H = L var/thermal_protection = H.get_thermal_protection() if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) - return + return TRUE + if(istype(L.loc, /mob/living) && L.loc != L) //Matryoshka check + return is_ash_immune(L.loc) + return FALSE //RIP you + +/datum/weather/ash_storm/impact(mob/living/L) + if(is_ash_immune(L)) + return L.adjustFireLoss(4) /datum/weather/ash_storm/emberfall //Emberfall: An ash storm passes by, resulting in harmless embers falling like snow. 10% to happen in place of an ash storm. @@ -215,4 +222,4 @@ /datum/weather/acid_rain/impact(mob/living/L) var/resist = L.getarmor(null, "acid") if(prob(max(0,100-resist))) - L.acid_act(20,20) \ No newline at end of file + L.acid_act(20,20)