2015-03-24 21:48:59 +01:00
|
|
|
local function register_flower(name)
|
|
|
|
minetest.register_decoration({
|
|
|
|
deco_type = "simple",
|
|
|
|
place_on = {"default:dirt_with_grass"},
|
|
|
|
sidelen = 16,
|
|
|
|
noise_params = {
|
|
|
|
offset = 0,
|
|
|
|
scale = 0.006,
|
|
|
|
spread = {x=100, y=100, z=100},
|
|
|
|
seed = 436,
|
|
|
|
octaves = 3,
|
|
|
|
persist = 0.6
|
|
|
|
},
|
|
|
|
y_min = 1,
|
|
|
|
y_max = 30,
|
2015-03-25 22:54:12 +01:00
|
|
|
decoration = "flowers:"..name,
|
2015-03-24 21:48:59 +01:00
|
|
|
})
|
|
|
|
end
|
2014-11-20 17:02:07 +01:00
|
|
|
|
2015-07-22 01:16:40 +02:00
|
|
|
local function register_mushroom(name)
|
|
|
|
minetest.register_decoration({
|
|
|
|
deco_type = "simple",
|
2015-07-24 22:33:13 +02:00
|
|
|
place_on = {"default:dirt_with_grass"},
|
2015-07-22 01:16:40 +02:00
|
|
|
sidelen = 16,
|
|
|
|
noise_params = {
|
|
|
|
offset = 0,
|
|
|
|
scale = 0.006,
|
|
|
|
spread = {x=100, y=100, z=100},
|
|
|
|
seed = 7133,
|
|
|
|
octaves = 3,
|
|
|
|
persist = 0.6
|
|
|
|
},
|
2015-07-24 22:33:13 +02:00
|
|
|
y_min = 1,
|
2015-07-22 01:16:40 +02:00
|
|
|
y_max = 30,
|
|
|
|
decoration = "flowers:"..name,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2015-03-24 21:48:59 +01:00
|
|
|
function flowers.register_mgv6_decorations()
|
|
|
|
register_flower("rose")
|
|
|
|
register_flower("tulip")
|
|
|
|
register_flower("dandelion_yellow")
|
|
|
|
register_flower("geranium")
|
|
|
|
register_flower("viola")
|
|
|
|
register_flower("dandelion_white")
|
2015-07-22 01:16:40 +02:00
|
|
|
|
|
|
|
register_mushroom("mushroom_brown")
|
|
|
|
register_mushroom("mushroom_red")
|
2014-11-05 21:22:55 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Enable in mapgen v6 only
|
|
|
|
|
2015-07-22 01:16:40 +02:00
|
|
|
if minetest.get_mapgen_params().mgname == "v6" then
|
2015-03-24 21:48:59 +01:00
|
|
|
flowers.register_mgv6_decorations()
|
|
|
|
end
|
|
|
|
|