2018-05-08 22:23:07 +02:00
|
|
|
local b = require "map_gen.shared.builders"
|
2018-11-06 14:08:33 +02:00
|
|
|
local degrees = require "utils.math".degrees
|
2018-01-21 17:30:42 +02:00
|
|
|
|
2018-05-08 22:23:07 +02:00
|
|
|
local small_circle = b.circle(16)
|
|
|
|
local big_circle = b.circle(18)
|
|
|
|
local ring = b.all{big_circle, b.invert(small_circle)}
|
|
|
|
|
|
|
|
local box = b.rectangle(10,10)
|
|
|
|
box = b.translate(box, 16, -16)
|
|
|
|
local line = b.rectangle(36,1)
|
|
|
|
line = b.translate(line, 0, -20.5)
|
|
|
|
box = b.any{box, line}
|
2018-01-21 17:30:42 +02:00
|
|
|
|
|
|
|
local boxes = {}
|
|
|
|
for i = 0, 3 do
|
2019-03-04 13:54:55 +02:00
|
|
|
local b = b.rotate(box, degrees(i*90)) -- luacheck: ignore 421
|
2018-01-21 17:30:42 +02:00
|
|
|
table.insert(boxes, b)
|
|
|
|
end
|
|
|
|
|
2018-05-08 22:23:07 +02:00
|
|
|
boxes = b.any(boxes)
|
2018-01-21 17:30:42 +02:00
|
|
|
|
2018-05-08 22:23:07 +02:00
|
|
|
local shape = b.any{ring, boxes}
|
2018-01-21 17:30:42 +02:00
|
|
|
|
|
|
|
local shapes ={}
|
|
|
|
local sf = 1.8
|
|
|
|
local sf_total = 1
|
|
|
|
for i = 1, 10 do
|
|
|
|
sf_total = sf_total * sf
|
2018-05-08 22:23:07 +02:00
|
|
|
local s = b.scale(shape, sf_total, sf_total)
|
2018-01-21 17:30:42 +02:00
|
|
|
table.insert(shapes, s)
|
|
|
|
end
|
|
|
|
|
2018-05-08 22:23:07 +02:00
|
|
|
local map = b.any(shapes)
|
2018-01-21 17:30:42 +02:00
|
|
|
|
2018-11-06 14:08:33 +02:00
|
|
|
return map
|