From b5ed18e980cb6047cf9b64343f3369b6905d534b Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 19 Jul 2015 00:36:18 -0400 Subject: [PATCH] Fixes #10218 --- code/game/machinery/constructable_frame.dm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 9ebe4a6ec2..56c2493ba0 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -109,18 +109,26 @@ if(component_check) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir) - new_machine.component_parts.Cut() + + if(new_machine.component_parts) + new_machine.component_parts.Cut() + else + new_machine.component_parts = list() + src.circuit.construct(new_machine) + for(var/obj/O in src) if(circuit.contain_parts) // things like disposal don't want their parts in them O.loc = new_machine else O.loc = null new_machine.component_parts += O + if(circuit.contain_parts) circuit.loc = new_machine else circuit.loc = null + new_machine.RefreshParts() qdel(src) else