[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
+3 -3
View File
@@ -219,12 +219,12 @@ If you create T5+ please take a pass at mech_fabricator.dm. The parts being good
lefthand_file = 'icons/mob/inhands/items/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi'
/obj/item/storage/part_replacer/proc/get_sorted_parts()
/obj/item/storage/part_replacer/proc/get_sorted_parts(ignore_stacks = FALSE)
var/list/part_list = list()
//Assemble a list of current parts, then sort them by their rating!
for(var/obj/item/component_part in contents)
//No need to put circuit boards in this list
if(istype(component_part, /obj/item/circuitboard))
//No need to put circuit boards in this list or stacks when exchanging parts
if(istype(component_part, /obj/item/circuitboard) || (ignore_stacks && istype(component_part, /obj/item/stack)))
continue
part_list += component_part
//Sort the parts. This ensures that higher tier items are applied first.
@@ -218,15 +218,6 @@
return data
/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/machinery/debug_component_printer
name = "debug component printer"
desc = "Produces components for the creation of integrated circuits."
@@ -529,12 +520,3 @@
data[initial(material_type.name)] = materials[material_type] * efficiency_coeff
return data
/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,
)