mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Hole and Hole-Adjacent Changes (#15345)
This commit is contained in:
@@ -52,11 +52,11 @@
|
||||
|
||||
var/turf/start = get_turf(src)
|
||||
if(!start.CanZPass(src, direction))
|
||||
to_chat(src, SPAN_WARNING("\The [start] is in the way."))
|
||||
to_chat(src, SPAN_WARNING("\The [start.GetZPassBlocker()] is in the way."))
|
||||
return FALSE
|
||||
|
||||
if(!destination.CanZPass(src, direction))
|
||||
to_chat(src, SPAN_WARNING("\The [destination] is in the way!"))
|
||||
to_chat(src, SPAN_WARNING("\The [destination.GetZPassBlocker()] is in the way!"))
|
||||
return FALSE
|
||||
|
||||
var/area/area = get_area(src)
|
||||
|
||||
@@ -158,10 +158,10 @@
|
||||
if(istype(target_ladder, target_down))
|
||||
direction = DOWN
|
||||
if(!LAD.CanZPass(M, direction))
|
||||
to_chat(M, "<span class='notice'>\The [LAD] is blocking \the [src].</span>")
|
||||
to_chat(M, "<span class='notice'>\The [LAD.GetZPassBlocker()] is blocking \the [src].</span>")
|
||||
return FALSE
|
||||
if(!T.CanZPass(M, direction))
|
||||
to_chat(M, "<span class='notice'>\The [T] is blocking \the [src].</span>")
|
||||
to_chat(M, "<span class='notice'>\The [T.GetZPassBlocker()] is blocking \the [src].</span>")
|
||||
return FALSE
|
||||
for(var/atom/A in T)
|
||||
if(!isliving(A))
|
||||
@@ -286,4 +286,4 @@
|
||||
|
||||
/obj/structure/stairs/west
|
||||
dir = WEST
|
||||
bound_width = 64
|
||||
bound_width = 64
|
||||
|
||||
@@ -39,15 +39,24 @@
|
||||
if(direction == DOWN) //on a turf above, trying to enter
|
||||
return !density
|
||||
|
||||
/turf/proc/GetZPassBlocker()
|
||||
return src
|
||||
|
||||
/turf/simulated/open/CanZPass(atom/A, direction)
|
||||
if(locate(/obj/structure/lattice/catwalk, src))
|
||||
if(z == A.z)
|
||||
if(direction == DOWN)
|
||||
return 0
|
||||
return FALSE
|
||||
else if(direction == UP)
|
||||
return 0
|
||||
return FALSE
|
||||
return 1
|
||||
|
||||
/turf/simulated/open/GetZPassBlocker()
|
||||
var/obj/structure/lattice/catwalk/catwalk = locate(/obj/structure/lattice/catwalk, src)
|
||||
if(catwalk)
|
||||
return catwalk
|
||||
return src
|
||||
|
||||
/turf/space/CanZPass(atom/A, direction)
|
||||
if(locate(/obj/structure/lattice/catwalk, src))
|
||||
if(z == A.z)
|
||||
@@ -57,6 +66,12 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/turf/space/GetZPassBlocker()
|
||||
var/obj/structure/lattice/catwalk/catwalk = locate(/obj/structure/lattice/catwalk, src)
|
||||
if(catwalk)
|
||||
return catwalk
|
||||
return src
|
||||
|
||||
|
||||
// Add a falling atom by default. Even if it's not an atom that can actually fall.
|
||||
// SSfalling will check this on its own and remove if necessary. This is saner, as it
|
||||
@@ -256,4 +271,4 @@
|
||||
return t.roof_type
|
||||
|
||||
/turf/simulated/open/is_open()
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user