From d899e68503a481a1e287036fd6a4a70112ef2b56 Mon Sep 17 00:00:00 2001 From: TeDGamer Date: Sun, 10 Sep 2023 17:01:06 -0400 Subject: [PATCH 1/2] Hive weeds now look for a supporting structure --- code/modules/cm_aliens/weeds.dm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/modules/cm_aliens/weeds.dm b/code/modules/cm_aliens/weeds.dm index 01140beae304..6fe99f05c899 100644 --- a/code/modules/cm_aliens/weeds.dm +++ b/code/modules/cm_aliens/weeds.dm @@ -193,13 +193,19 @@ // 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() - 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 + 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 // NO MORE FOOD ON THE TABLE. WE DIE - if(!parent || weed_strength > WEED_LEVEL_STANDARD) + if(!parent) qdel(src) /obj/effect/alien/weeds/proc/weed_expand() 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 2/2] 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)