Makes machines constructable either anchored or unanchored (#35968)

* - Makes machines constructable either anchored or unanchored if the board allows it

* - Tesla Coils connect to the network if anchored
This commit is contained in:
BordListian
2018-03-02 01:45:00 +01:00
committed by CitadelStationBot
parent 3690cf3309
commit 07270c198f
4 changed files with 32 additions and 2 deletions
+3 -2
View File
@@ -118,10 +118,10 @@
return
if(istype(P, /obj/item/circuitboard/machine))
if(!anchored)
var/obj/item/circuitboard/machine/B = P
if(!anchored && B.needs_anchored)
to_chat(user, "<span class='warning'>The frame needs to be secured first!</span>")
return
var/obj/item/circuitboard/machine/B = P
if(!user.transferItemToLoc(B, src))
return
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
@@ -174,6 +174,7 @@
if(component_check)
P.play_tool_sound(src)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, 1)
new_machine.anchored = anchored
new_machine.on_construction()
for(var/obj/O in new_machine.component_parts)
qdel(O)