Refactors material components to regular datums (#94596)

## About The Pull Request
This was LONG overdue and its finally time. Refactors 2 components to
regular datums
- `/datum/component/material_container` -> `/datum/material_container`
- `/datum/component/remote_materials` -> `/datum/remote_materials`

Reduced memory overhead and stops misuse of component i.e. storing it in
a variable

## Changelog
🆑
refactor: refactored material container code to reduce memory overhead.
Report bugs on github
/🆑
This commit is contained in:
SyncIt21
2025-12-25 01:02:10 +01:00
committed by GitHub
parent 4cd3fa8ee5
commit fa9c98058f
25 changed files with 180 additions and 176 deletions
+5 -4
View File
@@ -142,7 +142,7 @@
///Proximity monitor associated with this atom, needed for proximity checks.
var/datum/proximity_monitor/proximity_monitor
///Material container for materials
var/datum/component/material_container/materials
var/datum/material_container/materials
/// What can be input into the machine?
var/accepted_type = /obj/item/stack
@@ -150,8 +150,8 @@
. = ..()
proximity_monitor = new(src, 1)
materials = AddComponent( \
/datum/component/material_container, \
materials = new ( \
src, \
SSmaterials.materials_by_category[MAT_CATEGORY_SILO], \
INFINITY, \
MATCONTAINER_EXAMINE, \
@@ -163,7 +163,8 @@
selected_material = GET_MATERIAL_REF(/datum/material/iron)
/obj/machinery/mineral/processing_unit/Destroy()
materials = null
QDEL_NULL(proximity_monitor)
QDEL_NULL(materials)
mineral_machine = null
stored_research = null
return ..()