Skip to content

Commit

Permalink
[Balance] Hive weeds now look for a supporting structure (#4385)
Browse files Browse the repository at this point in the history
# About the pull request

Similar to how weed sacs can support another sac's weeds within range,
add this to stronger weeds as well.

So if you have a cluster and a core close together, when one of them is
destroyed, the hive weeds that are still within the range of the other
structure will not disappear.

# Explain why it's good for the game

Feels weird that all weeds receded next to other clusters / core when
they can definitely support it.

Plus weak weeds can do it, why can't thick weeds?


# Changelog

:cl:
balance: Hive weeds can be supported by other structures when original
parent structure is destroyed.
/:cl:

---------

Co-authored-by: harryob <[email protected]>
  • Loading branch information
TeDGamer and harryob authored Sep 12, 2023
1 parent 1e9fccf commit 692cc45
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,16 @@
// 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
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 || weed_strength > WEED_LEVEL_STANDARD)
if(!parent)
qdel(src)

/obj/effect/alien/weeds/proc/weed_expand()
Expand Down

0 comments on commit 692cc45

Please sign in to comment.