ChunkyChunks - Configurable Gridlines

by Qon

Chunk aligned blueprints? Display chunk lines without the annoying tile lines that the debug option adds. Configurable grids at any sizes if your blueprints are substation, chunk, roboport or radar sized (or any other size)!

Utilities
4 days ago
0.17 - 2.0
8.08K

b Error when using Remove Biter Soil

1 year, 1 month ago

When using https://mods.factorio.com/mod/RemoveBiterSoil I get the following error:

Error while running event ChunkyChunks::on_tick (ID 0)
ChunkyChunks/control.lua:357: attempt to index local 'surface' (a nil value)
stack traceback:
ChunkyChunks/control.lua:357: in function 'iterate_surface_chunks'
ChunkyChunks/control.lua:235: in function <ChunkyChunks/control.lua:217>

I solved it for now by adding a check for nil in control.lua:

function iterate_surface_chunks(surface)
local c = 0
if not (surface == nil) then
for chunk in surface.get_chunks() do
c = c + 1
blockify({position = fromXY(chunk), surface = surface})
end
end
return c
end

No idea of the implications, but now It does not crash at least.

3 months ago

I have the same problem in a EditorExtension save, I resolved it with checking for nil in the on_tick function:

    if empty and game.surfaces[index] then iterate_surface_chunks(game.surfaces[index]) end

Seems not to happen often since I'm not sure what triggered it as I used EditorExtensions before very often. Maybe because I copied some terrain in Editor mode. Fixing it this way does not seem to have any negative impact.

May Qon will return with the expansion, maybe someone will fork it ;-)

3 months ago

Thanks for the report!
I do read my notifications sometimes even if I'm not actively playing/modding the game right now.
But I have some vacation time now so there's at least a tiny chance I'll get back to fixing stuff before the DLC.

3 months ago

Thats great, thanks for responding!

New response