Since code says more than 100 words - I'm trying to achieve something like this:
Code: Select all
local pos = player.position
local startingSurface = player.surface
local tiles = {}
for i = -1000, 1000 do
	for j = -1000, 1000 do
		tiles[#tiles + 1] = {
			name = ((i < -10 or i > 10) or (j < -10 or j > 10)) and "out-of-map" or "grass",
			position = {pos.x + i, pos.y + j}
		}
	end
end
startingSurface.set_tiles(tiles, false)Now the real question: Is there a better API or approach for this?
Greetings


