Ashstorms Matryoshka bugfix (#2167)

This commit is contained in:
CitadelStationBot
2017-07-28 18:50:53 -05:00
committed by kevinz000
parent 3f8acbc2c4
commit a1c41c461a
+13 -6
View File
@@ -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)
L.acid_act(20,20)