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

15 lines
291 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)
2018-11-21 15:42:39 +02:00
local abs_x = math.abs(x)
local abs_y = math.abs(y)
2017-07-27 11:25:10 +02:00
2018-11-21 15:42:39 +02:00
return not (abs_x < abs_y - tiles_half or abs_x > abs_y + tiles_half)
2018-05-10 21:42:24 +02:00
end