Easiest way to replicate it that I found was:
- Create a small 256x256 world with iron ore gen size set to none.
- Check how much iron there is and what the iron ore gen size is. It should be "none" and "0", respectively.
Code: Select all
game.print("Iron gen: "..game.surfaces.nauvis.map_gen_settings.autoplace_controls["iron-ore"].size); game.print("Iron count: "..game.surfaces.nauvis.count_entities_filtered{name="iron-ore"})
- Change the iron gen size to normal. The console should now print "Iron gen: normal." (ran the same code as in the previous step).
Code: Select all
local settings=game.surfaces.nauvis.map_gen_settings; settings.autoplace_controls["iron-ore"].size="normal"; game.surfaces.nauvis.map_gen_settings=settings; game.print("Iron gen: "..game.surfaces.nauvis.map_gen_settings.autoplace_controls["iron-ore"].size)
- Run surface.regenerate_entity() and wait a bit. Count how much iron ore there is, which it'll be 0 still.
Code: Select all
for _, e in pairs(game.surfaces.nauvis.find_entities()) do e.destroy() end; game.surfaces.nauvis.regenerate_entity();
- Finally, delete all chunks so they are recreated, and count how much ore you have, a non-zero amount now. If you're using the seed I showed above, it'll be 738.
Code: Select all
for chunk in game.surfaces.nauvis.get_chunks() do game.surfaces.nauvis.delete_chunk(chunk) end