[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>
This commit is contained in:
SkyratBot
2021-03-24 20:52:10 +00:00
committed by GitHub
co-authored by MrMelbert
parent c3fdb6c80e
commit fc86bea537
+1 -1
View File
@@ -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)