Skip to content

Commit

Permalink
Flowers: Add mushrooms to mgv6
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Jul 23, 2015
1 parent e203302 commit bc4d0c1
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions mods/flowers/mapgen.lua
Expand Up @@ -17,19 +17,40 @@ local function register_flower(name)
})
end

local function register_mushroom(name)
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dirt_with_grass", "default:dirt"},
sidelen = 16,
noise_params = {
offset = 0,
scale = 0.006,
spread = {x=100, y=100, z=100},
seed = 7133,
octaves = 3,
persist = 0.6
},
y_min = -31000,
y_max = 30,
decoration = "flowers:"..name,
})
end

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")

register_mushroom("mushroom_brown")
register_mushroom("mushroom_red")
end

-- Enable in mapgen v6 only

local mg_params = minetest.get_mapgen_params()
if mg_params.mgname == "v6" then
if minetest.get_mapgen_params().mgname == "v6" then
flowers.register_mgv6_decorations()
end

1 comment on commit bc4d0c1

@HybridDog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mushrooms need to be generated as elf rings

Please sign in to comment.