mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 06:43:17 -04:00
Merge 2d1f8d4825
into 854415fd33
This commit is contained in:
commit
67f37926e7
1 changed files with 241 additions and 10 deletions
|
@ -402,16 +402,6 @@ function default.mgv6_ongen(minp, maxp, seed)
|
|||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Detect mapgen and register suitable on-generated function
|
||||
--
|
||||
|
||||
minetest.register_on_mapgen_init(function(mg_params)
|
||||
if mg_params.mgname == "v6" then
|
||||
minetest.register_on_generated(default.mgv6_ongen)
|
||||
end
|
||||
end)
|
||||
|
||||
--
|
||||
-- Generate nyan cats in all mapgens
|
||||
--
|
||||
|
@ -465,3 +455,244 @@ function default.generate_nyancats(minp, maxp, seed)
|
|||
end
|
||||
|
||||
minetest.register_on_generated(default.generate_nyancats)
|
||||
|
||||
--
|
||||
-- Register biomes
|
||||
--
|
||||
|
||||
function default.register_biomes()
|
||||
|
||||
minetest.register_biome({
|
||||
name = "grassland",
|
||||
node_top = "default:dirt_with_grass",
|
||||
depth_top = 1,
|
||||
node_filler = "default:dirt",
|
||||
depth_filler = 1,
|
||||
height_min = 4,
|
||||
height_max = 32000,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "grasslandbeach",
|
||||
node_top = "default:sand",
|
||||
depth_top = 1,
|
||||
node_filler = "default:sand",
|
||||
depth_filler = 2,
|
||||
height_min = 1,
|
||||
height_max = 3,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = "sandocean",
|
||||
node_top = "default:sand",
|
||||
depth_top = 1,
|
||||
node_filler = "default:sand",
|
||||
depth_filler = 2,
|
||||
height_min = -32000,
|
||||
height_max = 0,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
--
|
||||
-- Register decorations
|
||||
--
|
||||
|
||||
-- Flowers
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.01,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 436,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "flowers:rose",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.01,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 19822,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "flowers:tulip",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.01,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 1220999,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "flowers:dandelion_yellow",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.01,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 36662,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "flowers:geranium",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.01,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 1133,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "flowers:viola",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.01,
|
||||
scale = 0.03,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 73133,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "flowers:dandelion_white",
|
||||
})
|
||||
|
||||
-- Grasses
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.04,
|
||||
scale = 0.1,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "default:grass_1",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0.02,
|
||||
scale = 0.1,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "default:grass_2",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.1,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "default:grass_3",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.02,
|
||||
scale = 0.1,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "default:grass_4",
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.04,
|
||||
scale = 0.1,
|
||||
spread = {x=100, y=100, z=100},
|
||||
seed = 66440,
|
||||
octaves = 3,
|
||||
persist = 0.6
|
||||
},
|
||||
biomes = {"grassland"},
|
||||
decoration = "default:grass_5",
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
--
|
||||
-- Detect mapgen and select suitable biome code
|
||||
--
|
||||
|
||||
minetest.register_on_mapgen_init(function(mg_params)
|
||||
if mg_params.mgname == "v6" then
|
||||
minetest.register_on_generated(default.mgv6_ongen)
|
||||
else
|
||||
default.register_biomes()
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue