Fish and Wildlife


Adds regrowing trees and respawning fish.

Content
4 years ago
0.15 - 0.18
58
Environment

b fws:on_tick error

6 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?

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

6 years ago

Any ETA on the fix?

6 years ago

Should have it up by the weekend.

6 years ago

Ok, maybe longer.

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

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

6 years ago

Should be fixed now.

6 years ago

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

6 years ago

Excellent!

New response