diff options
author | kwolekr <mirrorisim@gmail.com> | 2012-12-18 13:23:16 -0500 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2013-01-21 21:41:37 +0200 |
commit | 96898c179458174f858bab6363636ef231b49865 (patch) | |
tree | ff40e2830df3bd491774714bfcc85dc9d56d3f94 /games/minimal/mods | |
parent | 11afcbff69c95915e5142bc4b55636ff6358ece9 (diff) | |
download | minetest-96898c179458174f858bab6363636ef231b49865.tar.gz minetest-96898c179458174f858bab6363636ef231b49865.tar.bz2 minetest-96898c179458174f858bab6363636ef231b49865.zip |
Add initial Lua biomedef support, fixed biome selection
Diffstat (limited to 'games/minimal/mods')
-rw-r--r-- | games/minimal/mods/default/init.lua | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/games/minimal/mods/default/init.lua b/games/minimal/mods/default/init.lua index 9900b98a5..15cc5a0bd 100644 --- a/games/minimal/mods/default/init.lua +++ b/games/minimal/mods/default/init.lua @@ -1586,6 +1586,82 @@ minetest.register_alias("mapgen_stone_with_coal", "default:stone_with_coal") minetest.register_alias("mapgen_stone_with_iron", "default:stone_with_iron") minetest.register_alias("mapgen_mese", "default:mese") +minetest.register_biome_groups({ +0.35, 0.30, 0.20 +}) + +-- +-- Register the biomes for the map generator +-- +minetest.register_biome({ + group_id = 0, + name = "Ocean", + terrain_type = "liquid", + node_top = "default:gravel", + node_filler = "default:stone", + num_top_nodes = 4, + height_min = -3000, + height_max = 3000, + heat_min = -20.0, + heat_max = 100.0, + humidity_min = 0.0, + humidity_max = 100.0, + scale = 10.0, + offset = -10.0, +}) + +minetest.register_biome({ + group_id = 1, + name = "Beach", + terrain_type = "normal", + node_top = "default:sand", + node_filler = "default:stone", + num_top_nodes = 5, + height_min = -3000, + height_max = 3000, + heat_min = 60.0, + heat_max = 100.0, + humidity_min = 0.0, + humidity_max = 100.0, + scale = 5.0, + offset = 5.0, +}) + +minetest.register_biome({ + group_id = 2, + name = "Land", + terrain_type = "normal", + node_top = "default:dirt_with_grass", + node_filler = "default:stone", + num_top_nodes = 5, + height_min = -3000, + height_max = 3000, + heat_min = -50.0, + heat_max = 100.0, + humidity_min = 0.0, + humidity_max = 100.0, + scale = 12.0, + offset = 10.0, +}) + +minetest.register_biome({ + group_id = 3, + name = "Hills", + terrain_type = "normal", + node_top = "default:dirt", + node_filler = "default:stone", + num_top_nodes = 3, + height_min = -3000, + height_max = 3000, + heat_min = -50.0, + heat_max = 100.0, + humidity_min = 0.0, + humidity_max = 100.0, + scale = 70.0, + offset = 30.0, +}) + + -- Support old code function default.spawn_falling_node(p, nodename) spawn_falling_node(p, nodename) |