mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 07:59:32 +01:00
Set sane default mapgen flags for flat, v6, etc.
This commit is contained in:
parent
b1cb7eafa7
commit
23edc81f9d
2 changed files with 13 additions and 5 deletions
|
@ -17,6 +17,9 @@ if mg_name ~= "flat" then
|
|||
else
|
||||
-- 1 perfectly flat bedrock layer
|
||||
local ground = minetest.get_mapgen_setting("mgflat_ground_level")
|
||||
if not ground then
|
||||
ground = 8
|
||||
end
|
||||
mcl_vars.bedrock_overworld_min = ground - 3
|
||||
mcl_vars.bedrock_overworld_max = mcl_vars.bedrock_overworld_min
|
||||
mcl_vars.bedrock_is_rough = false
|
||||
|
|
|
@ -345,11 +345,6 @@ local function register_mgv6_decorations()
|
|||
|
||||
end
|
||||
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
if mg_name == "v6" then
|
||||
register_mgv6_decorations()
|
||||
end
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if maxp.y >= 2 and minp.y <= 0 then
|
||||
-- Generate clay
|
||||
|
@ -531,3 +526,13 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
end
|
||||
end)
|
||||
|
||||
-- Apply mapgen-specific mapgen code
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
if mg_name == "v6" then
|
||||
register_mgv6_decorations()
|
||||
end
|
||||
if mg_name == "flat" then
|
||||
minetest.set_mapgen_setting("mg_flags", "nocaves,nodungeons,nodecorations")
|
||||
else
|
||||
minetest.set_mapgen_setting("mg_flags", "nodungeons")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue