[s] Prevent unbreakable ladders from being moved by shuttles (#38477)

* Prevent unbreakable ladders from being moved by shuttles

* Disconnect ladders before and reconnect them after shuttle move
This commit is contained in:
Tad Hardesty
2018-06-15 19:43:42 -07:00
committed by letterjay
parent 4780f3a20b
commit a7b900425b
2 changed files with 25 additions and 7 deletions
+10 -7
View File
@@ -23,13 +23,7 @@
/obj/structure/ladder/Destroy(force)
if ((resistance_flags & INDESTRUCTIBLE) && !force)
return QDEL_HINT_LETMELIVE
if(up && up.down == src)
up.down = null
up.update_icon()
if(down && down.up == src)
down.up = null
down.update_icon()
disconnect()
return ..()
/obj/structure/ladder/LateInitialize()
@@ -52,6 +46,15 @@
update_icon()
/obj/structure/ladder/proc/disconnect()
if(up && up.down == src)
up.down = null
up.update_icon()
if(down && down.up == src)
down.up = null
down.update_icon()
up = down = null
/obj/structure/ladder/update_icon()
if(up && down)
icon_state = "ladder11"