From 14d7b89b5f14113db5ee02c9bb8e92fac7ac5e9b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 13 Sep 2020 13:18:41 +0200 Subject: [PATCH] [MIRROR] Fix edible component overriding grind_results (#788) * Fix edible component overriding grind_results (#53650) Anything with both grind_results and /datum/component/edible currently does not give its grind_results when grinding it because the edible component is overriding it. This fixes that, I only found livers but there may be other items which are affected. * Fix edible component overriding grind_results Co-authored-by: msgerbs --- code/datums/components/food/edible.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 807ae7fe923..4629180be9f 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -71,7 +71,8 @@ Behavior that's still missing from this component that original food items had t RegisterSignal(parent, COMSIG_ITEM_MICROWAVE_ACT, .proc/OnMicrowaved) var/obj/item/item = parent - item.grind_results = list() //Cursed but this is how snacks did it, grinding needs a refactor in the future. + if (!item.grind_results) + item.grind_results = list() //If this doesn't already exist, add it as an empty list. This is needed for the grinder to accept it. else if(isturf(parent)) RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/TryToEatTurf)