diff --git a/code/modules/cm_aliens/weeds.dm b/code/modules/cm_aliens/weeds.dm index 6fe99f05c899..eb4fc3cd6f09 100644 --- a/code/modules/cm_aliens/weeds.dm +++ b/code/modules/cm_aliens/weeds.dm @@ -193,16 +193,13 @@ // If you're still confused, scroll aaaall the way down to the bottom of the file. // that's /obj/effect/alien/weeds/node/Destroy(). /obj/effect/alien/weeds/proc/avoid_orphanage() - if (weed_strength >= WEED_LEVEL_HIVE) - for(var/obj/effect/alien/weeds/node/pylon/N in orange(node_range, get_turf(src))) - // A pylon, cluster or core was nearby to support the hive weed - N.add_child(src) - break - else - for(var/obj/effect/alien/weeds/node/N in orange(node_range, get_turf(src))) - // WE FOUND A NEW MOMMY - N.add_child(src) - break + var/parent_type = /obj/effect/alien/weeds/node + if(weed_strength >= WEED_LEVEL_HIVE) + parent_type = /obj/effect/alien/weeds/node/pylon + + var/obj/effect/alien/weeds/node/found = locate(parent_type) in orange(node_range, get_turf(src)) + if(found) + found.add_child(src) // NO MORE FOOD ON THE TABLE. WE DIE if(!parent)