Jump to content

Spring Growth Modifier applied twice(?) to pickables that use external timers


Hornete
  • Fixed

image.png.9370ea8d1cd5b92dcd00108d261d0449.png

It seems the spring growth modifier can be applied twice in Resume, once regardless if it's spring or not.

This affects any pickable entity making use of the external timer feature of pickable, in the vanilla game, this only applies to the light bug flowers that spawn light bugs in the Lunar Grotto.

P.S.

Spoiler

Sneaking in a feature/formatting request, Teehee.

There are many seperate instances of `TUNING.SPRING_GROWTH_MODIFIER` and state.isspring checks, for my own(and possibly others) modding purposes, it's a bit inconvenient if we have a custom season or world scenario we'd like to have the spring modifier applied to!

I'd like to ask for implementation to change to making use of a single function akin to SpringCombatMod that returns the final value, and then we can easily wrap it ourselves

function SpringGrowthMod(amount)
    return TheWorld.state.isspring and amount * TUNING.SPRING_GROWTH_MODIFIER or amount
end

(Asking the same for the growable component)

Thank you for reading!

 


Steps to Reproduce

1. Go to the lunar grotto

2. Have it be spring

3. Kill a light bug

4. It will grow 1.7689x faster instead of 1.33x

  • Like 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

SpringGrowthMod has been added for this it is a reasonable request.

Changed Status to Fixed

  • Like 3
  • Thanks 1
  • Big Ups 1

Share this comment


Link to comment
Share on other sites

On 4/3/2024 at 4:52 PM, JesseB_Klei said:

SpringGrowthMod has been added for this it is a reasonable request.

Changed Status to Fixed

Hiya! I am loving the technical improvements with using SpringGrowthMod even for stuff like the rocky herd, there is a small error here though.

The handler SpringGrowthMod is used in rockyherd watches the season state, which is set before isspring

local function OnSeasonTick(src, data)
    SetVariable("season", data.season)
    SetVariable("isautumn", data.season == "autumn", "autumn")
    SetVariable("iswinter", data.season == "winter", "winter")
    SetVariable("isspring", data.season == "spring", "spring")
    SetVariable("issummer", data.season == "summer", "summer")
    SetVariable("elapseddaysinseason", data.elapseddaysinseason)
    SetVariable("remainingdaysinseason", data.remainingdaysinseason)
    SetVariable("seasonprogress", data.progress)
end

Meaning that the isspring check in SpringGrowthMod will not be accurate as it is not set yet by the time it is called.

Cheers!

Share this comment


Link to comment
Share on other sites



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...