mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Added the z-level manager system from TG (#19532)
Added the z-level manager system from TG, mostly
This commit is contained in:
@@ -34,7 +34,8 @@
|
||||
. = ..()
|
||||
// the upper will connect to the lower
|
||||
if(allowed_directions & DOWN) //we only want to do the top one, as it will initialize the ones before it.
|
||||
for(var/obj/structure/ladder/L in GetBelow(src))
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/structure/ladder/L in GET_TURF_BELOW(T))
|
||||
if(L.allowed_directions & UP)
|
||||
target_down = L
|
||||
L.target_up = src
|
||||
@@ -237,7 +238,7 @@
|
||||
/obj/structure/stairs/Initialize()
|
||||
. = ..()
|
||||
for(var/turf/turf in locs)
|
||||
var/turf/simulated/open/above = GetAbove(turf)
|
||||
var/turf/simulated/open/above = GET_TURF_ABOVE(turf)
|
||||
if(!above)
|
||||
log_asset("Stair created without z-level above: ([loc.x], [loc.y], [loc.z])")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -264,7 +265,8 @@
|
||||
var/atom/movable/AM = bumped_atom
|
||||
|
||||
// This is hackish but whatever.
|
||||
var/turf/target = get_step(GetAbove(AM), dir)
|
||||
var/turf/T = get_turf(AM)
|
||||
var/turf/target = get_step(GET_TURF_ABOVE(T), dir)
|
||||
if(!target)
|
||||
return
|
||||
if(target.z > (z + 1)) //Prevents wheelchair fuckery. Basically, you teleport twice because both the wheelchair + your mob collide with the stairs.
|
||||
|
||||
Reference in New Issue
Block a user