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

15 lines
283 B
Lua
Raw Normal View History

2017-07-27 11:25:10 +02:00
--X shape map script --by Neko_Baron
--edit this
local tiles_wide = 172
---dont edit these
local tiles_half = tiles_wide * 0.5
2018-05-10 21:42:24 +02:00
return function(x, y)
local abs_x = math.abs(x)
local abs_y = math.abs(y)
2017-07-27 11:25:10 +02:00
2018-05-10 21:42:24 +02:00
return not (abs_x < abs_y - tiles_half or abs_x > abs_y + tiles_half)
end