Fish and Wildlife


Adds regrowing trees and respawning fish.

Content
4 years ago
0.15 - 0.18
53
Environment

b fws:on_tick error

5 years ago

Hi, I get the following error periodically while playing with Fish and Wildlife turned on:
Error while running event fws::on_tick (ID 0)
Unknown entity name: dead-tree
stack traceback:
fws/control.lua:451: in function 'VisitChunk'
fws/control.lua:348: in function <fws/control.lua:336>

Anyone else experienced this?

5 years ago

There used to be an entity named "dead-tree." There isn't anymore. Not sure when it was removed (converted to a few variants) but I'll address this in the next update.

5 years ago

Any ETA on the fix?

5 years ago

Should have it up by the weekend.

5 years ago

Ok, maybe longer.

5 years ago

insert into control.lua between line 449 and 450 (right after "if r then"):

                if r == 'dead-tree' then
                    tile_type = surface.get_tile(e.position).name
                    if string.find(tile_type, "sand") or string.find(tile_type, "desert") then r = 'dead-tree-desert'
                    else r = 'dead-grey-trunk'
                    end
                end

Haven't managed to get the "desert" path to trigger yet, so it's not fully tested.

5 years ago

Just received the following error>

Error while running event fws::on_tick (ID 0)
Unknown entity name: dead-tree
stack traceback:
fws/control.lua:451: in function 'VisitChunk'
fws/control.lua:348: in function <fws/control.lua:336>

5 years ago

Should be fixed now.

5 years ago

Ran multiplayer for 12 hours with mod update no crash yet. :)

5 years ago

Excellent!

New response