Game crashes when i try regenerate all chunks with:
/c local surface = game.player.surface
for chunk in surface.get_chunks() do
local x={chunk.x,chunk.y}
surface.delete_chunk(chunk)
surface.request_to_generate_chunks(x, 0)
end
With error:
Error while running event b_light_poles::on_nth_tick(120)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
b_light_poles/control.lua:24: in function <b_light_poles/control.lua:22>
stack traceback:
[C]: in function 'index'
__b_light_poles/control.lua:24: in function <b_light_poles/control.lua:22>
I think, mod incorrectly processes delete_chunk.