[MIRROR] Circuit components can now be recycles in circuit printers, and automatically do so upon being removed if a circuit has a linked printer (#29316)

* Circuit components can now be recycles in circuit printers, and automatically do so upon being removed if a circuit has a linked printer (#85648)

## About The Pull Request

Added support for remote material insertion type whitelists and utilized
it to allow circuit printers to recycle components. Removing a component
from UI while the circuit has a linked printer will automatically
recycle it.

Also fixed a rogue space appearing when recycling a single item

## Why It's Good For The Game

You literally cannot do anything with components you remove/do not need
anymore so usually they end up littering circuit lab's floors. This
should make developing circuits slightly less annoying.

## Changelog
🆑
qol: Circuit components can now be recycles in circuit printers, and
automatically do so upon being removed if a circuit has a linked printer
spellcheck: Recycling a single item no longer outputs a line with a
rogue space infront of it
/🆑

* Circuit components can now be recycles in circuit printers, and automatically do so upon being removed if a circuit has a linked printer

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-08-15 22:26:22 +07:00
committed by GitHub
co-authored by SmArtKar
parent 25f58899d7
commit 45d85d569d
6 changed files with 19 additions and 8 deletions
@@ -22,7 +22,7 @@
/obj/machinery/component_printer/Initialize(mapload)
. = ..()
materials = AddComponent(/datum/component/remote_materials, mapload)
materials = AddComponent(/datum/component/remote_materials, mapload, whitelist_typecache = typecacheof(/obj/item/circuit_component))
/obj/machinery/component_printer/post_machine_initialize()
. = ..()