line 295 in farm_plants.lua
local function OnPicked(inst, doer) local x, y, z = inst.Transform:GetWorldPosition() if TheWorld.Map:GetTileAtPoint(x, y, z) == WORLD_TILES.FARMING_SOIL then local soil = SpawnPrefab("farm_soil") soil.Transform:SetPosition(x, y, z) soil:PushEvent("breaksoil") end if not inst.is_oversized and inst:HasTag("farm_plant_killjoy") and TryLuckRoll(doer, TUNING.FARMPLANT_SPAWN_FRUITFLY_ON_WEED_CHANCE, LuckFormulas.FruitFlyOnPickedWeed) then local fruitfly = SpawnPrefab("fruitfly") fruitfly.Transform:SetPosition(x, y, z) end call_for_reinforcements(inst, doer) end
TryLuckRoll call tries to call LuckFormulas.FruitFlyOnPickedWeedFruit which returns nil, as a result this causes a crash whenever fruitfly is supposed to spawn after picking a farm plant.
Might want to double check all other calls to LuckFormulas to ensure they're defined.
Steps to Reproduce
Pick a rotted farm plant and crash.
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