Closed USSX-Hares closed 1 year ago
You can fill a whole surface with lab tiles in the editor. Are you asking for a selection tool instead?
You can fill a whole surface with lab tiles in the editor. Are you asking for a selection tool instead?
Well, yes, I was asking for a selection tool. Have found a workaround with the selection tool script execution:
local tiles = { }
local tile_types = { [0] = "lab-dark-1", [1] = "lab-dark-2" }
game.player.print(string.format("Replacing tiles on region from (%i, %i) to (%i, %i)...", area.left_top[1], area.left_top[2], area.right_bottom[1], area.right_bottom[2]))
for x = area.left_top[1], area.right_bottom[1] - 1
do
for y = area.left_top[2], area.right_bottom[2] - 1
do table.insert(tiles, { position={ x, y }, name=tile_types[(x+y) % 2] })
end
end
game.player.surface.set_tiles(tiles, false)
Description
By now, editor extensions allow to use lab tile 1 and lib tile 2, but there is no option to fill the selected area with the alternating color pattern.
Reproduction
No response