Page 1 of 1

[1.1.34] LuaSurface.count_tiles_filtered() gives up

Posted: Thu Jun 03, 2021 8:25 pm
by DaveMcW
If you give LuaSurface.count_tiles_filtered() an area that is partially uncharted, it returns too early.

To reproduce, I started a new game, waited 30 minutes for all charting to finish, then tried to count some tiles. At about 800 tiles away from the start position, count_tiles_filtered() began failing.

Code: Select all

/c game.print(game.player.surface.count_tiles_filtered{area={{0,0},{100,800}}})
I believe this is reproducible on any map, but I attached a save you can test with.

count-tiles.jpg
count-tiles.jpg (390.24 KiB) Viewed 2109 times
count_tiles.zip
(2.95 MiB) Downloaded 152 times

Re: [1.1.34] LuaSurface.count_tiles_filtered() gives up

Posted: Fri Jun 04, 2021 8:07 am
by boskid
Fixed for 1.1.35