mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixes #10218
This commit is contained in:
@@ -109,18 +109,26 @@
|
|||||||
if(component_check)
|
if(component_check)
|
||||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
|
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
|
||||||
|
|
||||||
|
if(new_machine.component_parts)
|
||||||
new_machine.component_parts.Cut()
|
new_machine.component_parts.Cut()
|
||||||
|
else
|
||||||
|
new_machine.component_parts = list()
|
||||||
|
|
||||||
src.circuit.construct(new_machine)
|
src.circuit.construct(new_machine)
|
||||||
|
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
if(circuit.contain_parts) // things like disposal don't want their parts in them
|
if(circuit.contain_parts) // things like disposal don't want their parts in them
|
||||||
O.loc = new_machine
|
O.loc = new_machine
|
||||||
else
|
else
|
||||||
O.loc = null
|
O.loc = null
|
||||||
new_machine.component_parts += O
|
new_machine.component_parts += O
|
||||||
|
|
||||||
if(circuit.contain_parts)
|
if(circuit.contain_parts)
|
||||||
circuit.loc = new_machine
|
circuit.loc = new_machine
|
||||||
else
|
else
|
||||||
circuit.loc = null
|
circuit.loc = null
|
||||||
|
|
||||||
new_machine.RefreshParts()
|
new_machine.RefreshParts()
|
||||||
qdel(src)
|
qdel(src)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user