mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user