Add thread flexibility for cavegen
parent
13b9e9625f
commit
ab695af456
18
init.lua
18
init.lua
|
@ -63,9 +63,7 @@ function internal.init()
|
|||
internal.overworld_depth_to(WORLD_DEPTH)
|
||||
|
||||
-- Add custom caves
|
||||
minetest.register_mapgen_script(
|
||||
minetest.get_modpath(minetest.get_current_modname()) .. "/mapgen.lua"
|
||||
)
|
||||
internal.add_custom_caves("mapgen.lua")
|
||||
|
||||
-- Remove massive v7 caves
|
||||
internal.stop_v7_caverns()
|
||||
|
@ -111,7 +109,19 @@ function internal.init()
|
|||
internal.spawn_osmium_ore()
|
||||
|
||||
-- Add more dripstone blocks
|
||||
internal.register_dripstone_blocks()
|
||||
-- internal.register_dripstone_blocks()
|
||||
end
|
||||
|
||||
-- Start the cave generator
|
||||
function internal.add_custom_caves(filename)
|
||||
local fullname = minetest.get_modpath(minetest.get_current_modname()) .. "/" .. filename
|
||||
|
||||
if ns_cavegen_init and ns_cavegen_init.register_cavegen_script then
|
||||
ns_cavegen_init.register_cavegen_script(fullname)
|
||||
else
|
||||
minetest.log("warning", "User uses deprecated version 1.0.0 of cave generator - please update soon.")
|
||||
minetest.register_mapgen_script(fullname)
|
||||
end
|
||||
end
|
||||
|
||||
-- Create a deepcopy of a table
|
||||
|
|
Loading…
Reference in New Issue