Fixes some items produced by using plants not inheriting reagent purity (#79123)

## About The Pull Request

In #78322 I removed the reagent purity initialize argument from grown
items, thinking it was only used by butter. It was actually used in two
other places which I missed, in which I have implemented the same
functionality.
Rather than passing the desired purity on creation we instead just set
the purity of contents reagents after initialising the atom. This
broadly replicates what the edible component was doing, as these items
only get reagents from being edible.

## Changelog

🆑
fix: Meatwheat Clumps, Bungo Pits, and Eggplant Eggs should once again
inherit reagent purity from the grown item which produces them.
/🆑
This commit is contained in:
Jacquerel
2023-10-21 17:04:01 +02:00
committed by GitHub
parent 50a1a11109
commit 52f282c832
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -52,8 +52,8 @@
if(istype(source, /obj/item/food/grown) && ispath(trash, /obj/item/food))
var/obj/item/food/grown/plant = source
var/reagent_purity = plant.seed.get_reagent_purity()
trash_item = new trash(edible_object.drop_location(), reagent_purity)
trash_item = new trash(edible_object.drop_location())
trash_item.reagents?.set_all_reagents_purity(plant.seed.get_reagent_purity())
else
trash_item = generate_trash_procpath ? call(source, generate_trash_procpath)() : new trash(edible_object.drop_location())
+1 -1
View File
@@ -83,7 +83,7 @@
)
tastes = list("caramel" = 2, "popcorn" = 1)
foodtypes = JUNKFOOD | SUGAR
trash_type = /obj/item/trash/popcorn/
trash_type = /obj/item/trash/popcorn
crafting_complexity = FOOD_COMPLEXITY_1
/obj/item/food/soydope
+4 -4
View File
@@ -97,8 +97,8 @@
/obj/item/food/grown/meatwheat/attack_self(mob/living/user)
user.visible_message(span_notice("[user] crushes [src] into meat."), span_notice("You crush [src] into something that resembles meat."))
playsound(user, 'sound/effects/blobattack.ogg', 50, TRUE)
var/reagent_purity = seed.get_reagent_purity()
var/obj/item/food/meat/slab/meatwheat/M = new(null, reagent_purity)
var/obj/item/food/meat/slab/meatwheat/meaties = new(null)
meaties.reagents.set_all_reagents_purity(seed.get_reagent_purity())
qdel(src)
user.put_in_hands(M)
return 1
user.put_in_hands(meaties)
return TRUE