[MIRROR] Don't initialize stack components inside machines [MDB IGNORE] (#19043)

Don't initialize stack components inside machines (#72863)

## About The Pull Request

An attempt at the
[Initiative](https://github.com/tgstation/dev-cycles-initiative/issues/29)
all types/subtypes of `obj/item/stack` no longer exist inside any
machine. Only during deconstruction is the stack created from the
circuit boards requested components.

Also moved the component printer & module duplicator circuitboards into
`machine_circuitboards.dm` so they all are in one place

I was unable to do this for circuitboards because that still needs to
exist so we can use `apply_default_parts()` on the machine. I tried to
do the whole datum circuitboard approach just like with stock parts but
i'm unsure about it so maybe next time

## Changelog
🆑
refactor: stack components no longer exist inside a machine's
component_parts
refactor: move component printer & module duplicator circuitboards into
machine_circuitboards.dm
/🆑

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-02-03 21:26:01 +01:00
committed by GitHub
parent a2ddf56e62
commit d6f1a76dea
6 changed files with 135 additions and 133 deletions
@@ -92,12 +92,12 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
comp_path = def_components[comp_path]
if(ispath(comp_path, /obj/item/stack))
machine.component_parts += new comp_path(machine, comp_amt)
continue
else if (ispath(comp_path, /datum/stock_part))
var/stock_part_datum = GLOB.stock_part_datums[comp_path]
if (isnull(stock_part_datum))
CRASH("[comp_path] didn't have a matching stock part datum")
for (var/_ in 1 to comp_amt)
var/stock_part_datum = GLOB.stock_part_datums[comp_path]
if (isnull(stock_part_datum))
CRASH("[comp_path] didn't have a matching stock part datum")
machine.component_parts += stock_part_datum
else
for(var/component in 1 to comp_amt)
@@ -365,6 +365,23 @@
/obj/item/stack/sheet/plasteel = 5)
//Generic
/obj/item/circuitboard/machine/component_printer
name = "\improper Component Printer (Machine Board)"
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/component_printer
req_components = list(
/datum/stock_part/matter_bin = 2,
/datum/stock_part/manipulator = 2,
)
/obj/item/circuitboard/machine/module_duplicator
name = "\improper Module Duplicator (Machine Board)"
greyscale_colors = CIRCUIT_COLOR_SCIENCE
build_path = /obj/machinery/module_duplicator
req_components = list(
/datum/stock_part/matter_bin = 2,
/datum/stock_part/manipulator = 2,
)
/obj/item/circuitboard/machine/circuit_imprinter
name = "Circuit Imprinter"