From ca3ba1fc0167154cebc8e4330dfcfd1af0ce0d47 Mon Sep 17 00:00:00 2001 From: TeDGamer <107966994+TeDGamer@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:33:35 -0400 Subject: [PATCH] Update code/modules/cm_aliens/weeds.dm Co-authored-by: harryob --- code/modules/cm_aliens/weeds.dm | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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)