[1.1.34] LuaSurface.count_tiles_filtered() gives up
Posted: Thu Jun 03, 2021 8:25 pm
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.
I believe this is reproducible on any map, but I attached a save you can test with.
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}}})