From 3bd95e30bc757db181eebb0a651ef2c467194a32 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 23 Oct 2023 19:13:02 +0200 Subject: [PATCH] [MIRROR] Pass reagent purity into food created via chemical reaction [MDB IGNORE] (#24526) * Pass reagent purity into food created via chemical reaction (#79148) ## About The Pull Request Another missed argument passage. Dough created by mixing reagents now has a purity related to the purity of the creating reagents, and so on for other foods created by mixing chemicals. ## Changelog :cl: fix: Food created by mixing chemicals once again has a reagent purity based on the component chemicals. /:cl: * Pass reagent purity into food created via chemical reaction --------- Co-authored-by: Jacquerel --- code/modules/food_and_drinks/recipes/food_mixtures.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/food_and_drinks/recipes/food_mixtures.dm b/code/modules/food_and_drinks/recipes/food_mixtures.dm index 24cb557b239..3b6092917b4 100644 --- a/code/modules/food_and_drinks/recipes/food_mixtures.dm +++ b/code/modules/food_and_drinks/recipes/food_mixtures.dm @@ -45,10 +45,9 @@ if(resulting_food_path) var/atom/location = holder.my_atom.drop_location() for(var/i in 1 to created_volume) + var/obj/item/food/result = new resulting_food_path(location) if(ispath(resulting_food_path, /obj/item/food) && !isnull(resulting_reagent_purity)) - new resulting_food_path(location, resulting_reagent_purity) - else - new resulting_food_path(location) + result.reagents?.set_all_reagents_purity(resulting_reagent_purity) /datum/chemical_reaction/food/tofu required_reagents = list(/datum/reagent/consumable/soymilk = 10)