Food items should now pass down their intrinsic food materials during crafting (#91808)

## About The Pull Request

![image](https://github.com/user-attachments/assets/3bf777fc-2636-4b7d-8fef-dab10723e937)
Food items pass down their intrinsic materials during crafting, which
should prevent foods being crafted from meat being red and squishy. The
implementation might be too broad or kinda suck but it worked for the
problem items I tested it on (headcheese, crispy breaded headcheese,
moussaka, ballpark tsukune).

Also properly sets up `material_flags` to be a bitflag when viewing
variables.

## Why It's Good For The Game
Makes intrinsic food materials actually do what they're supposed to do
(prevent food being crafted with meat from being weirdly too meaty).

## Changelog

🆑
code: Materials bitflags should now show the bitflag interface in VV.
fix: Food items now pass down their intrinsic materials during
crafting/processing/microwaving/etc. etc.
/🆑

Co-authored-by: Hatterhat <Hatterhat@users.noreply.github.com>
This commit is contained in:
Hatterhat
2025-07-02 12:00:36 +10:00
committed by GitHub
co-authored by Hatterhat
parent 22b0e53b11
commit 0523b2d2a4
7 changed files with 43 additions and 8 deletions
+4
View File
@@ -79,6 +79,10 @@
original_object.reagents.trans_to(baked_result, original_object.reagents.total_volume)
if(added_reagents) // Add any new reagents that should be added
baked_result.reagents.add_reagent_list(added_reagents)
if(istype(original_object, /obj/item/food) && istype(baked_result, /obj/item/food))
var/obj/item/food/original_food = original_object
var/obj/item/food/baked_food = baked_result
LAZYADD(baked_food.intrinsic_food_materials, original_food.intrinsic_food_materials)
if(who_baked_us)
ADD_TRAIT(baked_result, TRAIT_FOOD_CHEF_MADE, who_baked_us)