Fix constructed directional windows leaking atmos, wrap setting of the anchored var on objects (#38934)

* Wrap setting anchored for structures, fix atmos bug

* forgot this

* Add a signal for setanchored

* move setanchored to obj

* machinery, also some structure stuff

* tabbing
This commit is contained in:
vuonojenmustaturska
2018-07-06 21:27:35 +03:00
committed by letterjay
parent 981743a170
commit 417496aa6e
27 changed files with 62 additions and 51 deletions
+4 -4
View File
@@ -106,7 +106,7 @@
if(P.use_tool(src, user, 40, volume=75))
if(state == 1)
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
anchored = !anchored
setAnchored(!anchored)
return
if(2)
@@ -114,7 +114,7 @@
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
anchored = !anchored
setAnchored(!anchored)
return
if(istype(P, /obj/item/circuitboard/machine))
@@ -169,7 +169,7 @@
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
anchored = !anchored
setAnchored(!anchored)
return
if(istype(P, /obj/item/screwdriver))
@@ -181,7 +181,7 @@
if(component_check)
P.play_tool_sound(src)
var/obj/machinery/new_machine = new circuit.build_path(loc, 1)
new_machine.anchored = anchored
new_machine.setAnchored(anchored)
new_machine.on_construction()
for(var/obj/O in new_machine.component_parts)
qdel(O)