mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Food items should now pass down their intrinsic food materials during crafting (#91808)
## About The Pull Request  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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user