Jump to content

Treeguard Idol can select deciduous trees that aren't medium-sized


hoxi
  • Pending

The StartMonster() function in deciduoustrees.lua checks that they have "normal animations", which means medium sized, as explained with the dev comment below:

local function StartMonster(inst, force, starttimeoffset)
    -- Become a monster. Requires tree to have leaves and be medium size (it will grow to large size when become monster)
    if force or (inst.anims == normal_anims and inst.leaf_state ~= "barren") then

However, the CanTransformIntoLeifTest() function in leif_idol.lua lacks such a check, resulting in trees that don't match being selected, the task being scheduled on them anyway, only for it to fail when it executes.

            (
                target:HasTag("birchnut") and
                target.leaf_state ~= "barren" and
                not target.monster and
                target.monster_start_task == nil and
                target.monster_stop_task == nil and
                target.domonsterstop_task == nil
            )

Maybe a function could be added to check the anims in deciduoustrees.lua, to be called from here (and potentially other places if needed now or later).


Steps to Reproduce
  1. Place an idol in front of two big or small deciduous trees, with some medium sized ones behind them, and even some evergreens. The idea is that the big or small deciduous trees are closer to the idol compared to other trees.
  2. Burn the idol.
  3. Notice how nothing happens.



User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...