Merge pull request #5496 from Citadel-Station-13/upstream-merge-35339

[MIRROR] Support stations with multiple z-levels
This commit is contained in:
deathride58
2018-02-17 21:24:48 +00:00
committed by GitHub
27 changed files with 278 additions and 196869 deletions

View File

@@ -35,19 +35,20 @@
/obj/structure/ladder/LateInitialize()
// By default, discover ladders above and below us vertically
var/turf/T = get_turf(src)
var/obj/structure/ladder/L
if (!down)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z - 1))
L = locate() in SSmapping.get_turf_below(T)
if (L)
down = L
L.up = src // Don't waste effort looping the other way
L.update_icon()
break
if (!up)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
L = locate() in SSmapping.get_turf_above(T)
if (L)
up = L
L.down = src // Don't waste effort looping the other way
L.update_icon()
break
update_icon()