Glass floor interactions properly check if objects are above them for fire and blobs (#21490)

* It's used elsewhere already

* Update obj_defense.dm
This commit is contained in:
Vi3trice
2023-07-07 13:35:05 +01:00
committed by GitHub
parent 9793ea3c33
commit 66440b4139
+2 -2
View File
@@ -90,7 +90,7 @@
/obj/blob_act(obj/structure/blob/B)
if(isturf(loc))
var/turf/T = loc
if((T.intact && level == 1) || T.transparent_floor) //the blob doesn't destroy thing below the floor
if(level == 1 && (T.intact||T.transparent_floor)) //the blob doesn't destroy thing below the floor
return
take_damage(400, BRUTE, MELEE, 0, get_dir(src, B))
@@ -200,7 +200,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
/obj/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
if(isturf(loc))
var/turf/T = loc
if((T.intact && level == 1) || T.transparent_floor) //fire can't damage things hidden below the floor.
if(level == 1 && (T.intact||T.transparent_floor)) //fire can't damage things hidden below the floor.
return
..()
if(QDELETED(src)) // Some items, like patches, might get qdeled in the parent call