From fc86bea537dc2c455aa33764e61bc503ca85e07f Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 24 Mar 2021 21:52:10 +0100 Subject: [PATCH] [MIRROR] Fix plant trash from grown food not inheriting their proper seeds (#4375) * Fix plant trash from grown food not inheriting their proper seeds (#57924) This PR fixes plant trash not getting the seed from their parent. trash_type is a type path, not an instantiated object. istype always fails trying to use it on trash_type. ispath is the correct helper to use here, because it's a type path and not an object. * Fix plant trash from grown food not inheriting their proper seeds Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index a44b412a1f2..b5fa85548be 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -78,7 +78,7 @@ /// Callback proc for bonus behavior for generating trash of grown food. Used by [/datum/element/food_trash]. /obj/item/food/grown/proc/generate_trash() // If this is some type of grown thing, we pass a seed arg into its Inititalize() - if(istype(trash_type, /obj/item/grown) || istype(trash_type, /obj/item/food/grown)) + if(ispath(trash_type, /obj/item/grown) || ispath(trash_type, /obj/item/food/grown)) return new trash_type(src, seed) return new trash_type(src)