1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00
RedMew/locale/gen_shape/left.lua

21 lines
464 B
Lua
Raw Normal View History

function run_shape_module(event)
local area = event.area
local surface = event.surface
local tiles = {}
top_left = area.left_top --make a more direct reference
if top_left.x > 100 or top_left.y > 200 or top_left.y < -200 then
for x = top_left.x-1, top_left.x + 32 do
for y = top_left.y-1, top_left.y + 32 do
table.insert(tiles, {name = "out-of-map", position = {x,y}})
end
end
surface.set_tiles(tiles)
return false
end
return true
end