Use get_mapgen_params.
This commit is contained in:
parent
812dcca7b9
commit
357be42a0a
1 changed files with 3 additions and 2 deletions
5
init.lua
5
init.lua
|
@ -68,13 +68,14 @@ end
|
|||
-- whether to use biomes and heightmap
|
||||
fun_caves.use_bi_hi = false
|
||||
local mg_params = minetest.get_mapgen_params()
|
||||
if mg_params and mg_params.mgname ~= "v6" and mg_params.mgname ~= "v5" then
|
||||
local mgname = minetest.get_mapgen_setting('mg_name')
|
||||
if mgname ~= "v6" and mgname ~= "v5" then
|
||||
fun_caves.use_bi_hi = true
|
||||
end
|
||||
|
||||
|
||||
minetest.register_on_mapgen_init(function(mgparams)
|
||||
minetest.set_mapgen_params({flags="nocaves,nodungeons"})
|
||||
minetest.set_mapgen_setting('mg_flags', "nocaves, nodungeons", true)
|
||||
end)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue