[MIRROR] Machines now store their components in their contents. (#966)

* Machines now store their components in their contents. (#52970)

Machine parts are now located in the machine instead of nullspace.

* Machines now store their components in their contents.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
SkyratBot
2020-09-24 20:33:40 +02:00
committed by GitHub
parent 7c4299cdb9
commit ef28f115cc
25 changed files with 213 additions and 119 deletions
@@ -37,7 +37,7 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
return
M.component_parts = list(src) // List of components always contains a board
moveToNullspace()
forceMove(M)
for(var/comp_path in req_components)
var/comp_amt = req_components[comp_path]
@@ -48,10 +48,10 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
comp_path = def_components[comp_path]
if(ispath(comp_path, /obj/item/stack))
M.component_parts += new comp_path(null, comp_amt)
M.component_parts += new comp_path(M, comp_amt)
else
for(var/i in 1 to comp_amt)
M.component_parts += new comp_path(null)
M.component_parts += new comp_path(M)
M.RefreshParts()