mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Adds a few turf istype helpers (#20754)
* a very calming act when the world is too much, too fast * i'm tired but i have to be efficient, infinite * lick your lips at the sight of me a fantasy made reality
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
var/turf/T = user.loc
|
||||
if(T.intact || !istype(T, /turf/open/floor))
|
||||
if(T.intact || !isfloorturf(T))
|
||||
return
|
||||
if(get_dist(src, user) > 1)
|
||||
return
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
|
||||
return //Yeah just stop.
|
||||
|
||||
if(istype(T, /turf/open/space)) // Stop processing this stuff if we've been ejected.
|
||||
if(isspaceturf(T)) // Stop processing this stuff if we've been ejected.
|
||||
return
|
||||
|
||||
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
|
||||
@@ -243,7 +243,7 @@
|
||||
return(gain)
|
||||
|
||||
/obj/machinery/power/supermatter_shard/blob_act(obj/structure/blob/B)
|
||||
if(B && !istype(loc, /turf/open/space)) //does nothing in space
|
||||
if(B && !isspaceturf(loc)) //does nothing in space
|
||||
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
|
||||
damage += B.health * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us
|
||||
if(B.health > 100)
|
||||
|
||||
Reference in New Issue
Block a user