mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user