[MIRROR] Makes ladders craftable (#1736)

* Makes ladders craftable (#54485)

* Makes ladders craftable

Co-authored-by: wesoda25 <37246588+wesoda25@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-11-19 23:58:30 +00:00
committed by GitHub
co-authored by wesoda25
parent 6329bbca1a
commit 6b98d55573
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