Makes ladders craftable (#54485)

This commit is contained in:
wesoda25
2020-11-19 18:11:15 -05:00
committed by GitHub
parent 2ef129ed44
commit 23197a58ab
2 changed files with 13 additions and 6 deletions
+12 -6
View File
@@ -7,6 +7,7 @@
anchored = TRUE
var/obj/structure/ladder/down //the ladder below this one
var/obj/structure/ladder/up //the ladder above this one
var/crafted = FALSE
obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN
/obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down)
@@ -35,15 +36,17 @@
if (!down)
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()
if(crafted == L.crafted)
down = L
L.up = src // Don't waste effort looping the other way
L.update_icon()
if (!up)
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()
if(crafted == L.crafted)
up = L
L.down = src // Don't waste effort looping the other way
L.update_icon()
update_icon()
@@ -195,3 +198,6 @@
break // break if both our connections are filled
update_icon()
/obj/structure/ladder/crafted
crafted = TRUE