1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-30 04:30:58 +02:00
RedMew/map_layout.lua

16 lines
618 B
Lua
Raw Normal View History

2017-06-13 13:16:07 +02:00
if not global.map_layout_name then global.map_layout_name = "" end
local function chunk_modification(event)
if global.map_layout_name == "Up" then
local tiles = {}
if event.area.left_top.y > 50 or event.area.left_top.x > 96 or event.area.left_top.x < -128 then
for x = event.area.left_top.x, event.area.right_bottom.x do
for y = event.area.left_top.y, event.area.right_bottom.y do
table.insert(tiles, {name = "out-of-map", position = {x,y}})
end
end
surface.set_tiles(tiles)
end
end
Event.register(defines.events.on_chunk_generated, chunk_modification)