Unit test material checks are now performed on all crafting recipes by default. All stack recipes now transfer mats to the results (#92620)

## About The Pull Request
Extends the part of the crafting unit test that ensures consistency
between the total mats of the components of a recipe (or rather, the
result of said recipe) and a generic instance of the same type as its
result, previously only implemented on food recipes.

## Why It's Good For The Game
This ensures a degree of consistency with the material composition of
various objects in the game. I couldn't do it in the original PR as that
one was too big already and it took months to get it merged, and have
the relative bugs fixed.

Currently a WIP as I slowly deal with the unit test reports.

## Changelog

🆑
refactor: Follow-up to the crafting/material refactor from months ago.
All objects crafted with stacks now inherit their mat composition (not
necessarily the effects and color) by default, while previously only a
few things like chair, sinks and toilets did. Report any object looking
or behaving weirdly as a result.
fix: The material composition of ammo boxes is no longer a 1/10 of what
it's supposed to be. It was a shitty hack to make it harder to recycle
empty ammo boxes. Instead, they lose materials as they're emptied now.
/🆑
This commit is contained in:
Ghom
2025-12-02 18:29:01 -05:00
committed by GitHub
parent 085007eae1
commit 0b0c5ea91e
272 changed files with 850 additions and 280 deletions
+2
View File
@@ -31,6 +31,8 @@
slot_flags = ITEM_SLOT_BELT
resistance_flags = FLAMMABLE
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT, /datum/material/iron = HALF_SHEET_MATERIAL_AMOUNT)
/// The stored pen
var/obj/item/pen/pen
/// Is the pen integrated?
+1 -1
View File
@@ -11,7 +11,7 @@
max_integrity = 5000 // To make attacking it not instantly break it
throwforce = 2
interaction_flags_mouse_drop = NEED_HANDS
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/// The amount of times this bell has been rang, used to check the chance it breaks
var/times_rang = 0
/// Is this bell broken?
+1
View File
@@ -17,6 +17,7 @@
icon_state = "filingcabinet"
density = TRUE
anchored = TRUE
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2)
/obj/structure/filingcabinet/chestdrawer
name = "chest drawer"
+1
View File
@@ -7,6 +7,7 @@
pressure_resistance = 2
resistance_flags = FLAMMABLE
obj_flags = UNIQUE_RENAME | RENAME_NO_DESC
custom_materials = list(/datum/material/cardboard = SHEET_MATERIAL_AMOUNT)
/// The background color for tgui in hex (with a `#`)
var/bg_color = "#7f7f7f"
/// A typecache of the objects that can be inserted into a folder
+1
View File
@@ -27,6 +27,7 @@
drop_sound = 'sound/items/handling/paper_drop.ogg'
pickup_sound = 'sound/items/handling/paper_pickup.ogg'
grind_results = list(/datum/reagent/cellulose = 3)
custom_materials = list(/datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2)
color = COLOR_WHITE
item_flags = SKIP_FANTASY_ON_SPAWN
interaction_flags_click = NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING
+1
View File
@@ -204,6 +204,7 @@
desc = "A plastic card for confidential corporate matters. Can be written on with pen somehow."
icon_state = "corppaperslip"
grind_results = list(/datum/reagent/plastic_polymers = 1.5) //It's a plastic card after all
custom_materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 3, /datum/material/paper = HALF_SHEET_MATERIAL_AMOUNT / 2)
max_integrity = 130 //Slightly more sturdy because of being made out of a plastic
drop_sound = 'sound/items/handling/disk_drop.ogg'
pickup_sound = 'sound/items/handling/disk_pickup.ogg'
+1
View File
@@ -215,6 +215,7 @@
papertype = /obj/item/paper/natural
resistance_flags = FLAMMABLE
bin_overlay_string = "paper_bundle_overlay"
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
///Cable this bundle is held together with.
var/obj/item/stack/cable_coil/binding_cable
+1 -1
View File
@@ -165,7 +165,7 @@
icon_state = "pen-charcoal"
colour = "#696969"
font = CHARCOAL_FONT
custom_materials = null
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
grind_results = list(/datum/reagent/ash = 5, /datum/reagent/cellulose = 10)
requires_gravity = FALSE // this is technically a pencil
can_click = FALSE