-- in weed_plants.lua Line 182: local GROWTH_STAGES = { ...... { name = "bolting", pregrowfn = function(inst) ConsumeNutrients(inst) end, fn = function(inst, stage, stage_data) MakePickable(inst, false) MakeFull(inst, true) UpdateSpreading(inst, stage_data) inst.components.farmplanttendable:SetTendable(false) inst:UpdateResearchStage(stage) inst.components.growable:StopGrowing() inst.components.growable.magicgrowable = false PlayStageAnim(inst, "bloomed") inst.mature = true end, dig_fx = "dirt_puff", inspect_str = "FULL_WEED", }, } local function PlayStageAnim(inst, anim, custom_pre) if POPULATING or inst:IsAsleep() then inst.AnimState:PlayAnimation("crop_"..anim, true) inst.AnimState:SetTime(math.random() * inst.AnimState:GetCurrentAnimationLength()) elseif custom_pre ~= nil then inst.AnimState:PlayAnimation(custom_pre, false) inst.AnimState:PushAnimation("crop_"..anim, true) else inst.AnimState:PlayAnimation("grow_"..anim, false) inst.AnimState:PushAnimation("crop_"..anim, true) end end
weed_firenettle、weed_tillweed、weed_ivy lack the animation of“crop_bloomed”,when they are in bolt stage and alseep,AnimState:GetCurrentAnimationLength() return -1 and causes a crash about math.random
Steps to Reproduce
As Above
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 accountSign in
Already have an account? Sign in here.
Sign In Now