1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-30 04:30:58 +02:00
This commit is contained in:
grilledham 2018-05-16 11:38:00 +01:00
parent a1b855e3de
commit 9efa771ad6

View File

@ -1,16 +1,35 @@
local b = require "map_gen.shared.builders"
local b = require 'map_gen.shared.builders'
local gb = require 'map_gen.shared.global_builders'
local Token = require('utils.global_token')
local land = b.rectangle(32,16)
local tiles = {
'grass-1',
'concrete',
'dirt-1',
'stone-path',
'lab-dark-1',
'lab-white'
}
local shapes = {
gb.pack(require('map_gen.presets.fruit_loops')),
gb.pack(require('map_gen.presets.creation_of_adam'))
}
local circle = b.circle(4)
local patch = b.resource(b.circle(8), "iron-ore")
local function pattern_func()
local i = math.random(#shapes)
--return gb.tile(tiles[i])
return shapes[i]
end
local tree = b.entity(circle, "tree-01")
local pt = Token.register(pattern_func)
--[[ local shape = b.apply_entity(land, patch)
shape = b.apply_entity(shape, tree) ]]
local shape = gb.grid_pattern_endless({}, 128, 128, pt)
local shape = b.apply_entities(land, {patch, tree})
shape = gb.unpack(shape)
return shape
--shape = b.rotate(shape, math.rad(45))
--return shape
return b.rotate(require('map_gen.presets.creation_of_adam'), math.rad(45))