chart_all ignores unvisited surfaces

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

chart_all ignores unvisited surfaces

Post by SupplyDepoo »

The chart_all method won't chart surfaces until the player has teleported to them, even when the surface name is specified.

Reproduction steps:
  1. Start a new freeplay scenario with default settings.
  2. Create a new surface and try to chart a large area:
  3. /c game.create_surface("test")
  4. /c game.surfaces["test"].request_to_generate_chunks({0, 0}, 20)
  5. /c game.player.force.chart_all("test")
  6. /c game.player.teleport({0, 0}, "test")
  7. Open the map and notice that only a tiny area is charted.

Loewchen
Global Moderator
Global Moderator
Posts: 8321
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.101] chart_all ignores unvisited surfaces

Post by Loewchen »

No chunks have been generated so no chunks will be charted.

User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

Re: chart_all ignores unvisited surfaces

Post by SupplyDepoo »

The chunks are definitely generated, with the following evidence:
  1. There is perceptible lag when request_to_generate_chunks is called with a large radius like 20 chunks.
  2. The on_chunk_generated event is raised for those chunk positions.
  3. The function is_chunk_generated returns true for those chunk positions.
  4. Using chart(surface, area) instead of chart_all(surface) yields the expected result. The attached video shows the difference.


But if I teleport to the surface before chart_all() is called, then it does chart all of the chunks:
teleport_before_chart_all.gif
teleport_before_chart_all.gif (2.49 MiB) Viewed 686 times
So the behaviour between chart() and chart_all() differs depending on if I go to the surface beforehand, which is unexpected and I would say a bug.
Attachments
chart_all_bug.mp4
(1.2 MiB) Downloaded 22 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: chart_all ignores unvisited surfaces

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”