fun_caves/init.lua
2017-01-24 19:54:46 -06:00

32 lines
950 B
Lua

-- Fun_Caves init.lua
-- Copyright Duane Robertson (duane@duanerobertson.com), 2017
-- Distributed under the LGPLv2.1 (https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
fun_caves_mod = {}
fun_caves_mod.version = "2.0"
fun_caves_mod.time_factor = 1 -- affects growth abms
fun_caves_mod.light_max = 8 -- light intensity for mushroom growth
fun_caves_mod.path = minetest.get_modpath(minetest.get_current_modname())
fun_caves_mod.world = minetest.get_worldpath()
function fun_caves_mod.clone_node(name)
if not (name and type(name) == 'string') then
return
end
local node = minetest.registered_nodes[name]
local node2 = table.copy(node)
return node2
end
minetest.register_on_mapgen_init(function(mgparams)
--minetest.set_mapgen_setting('mg_flags', "nocaves, nodungeons", true)
minetest.set_mapgen_setting('mg_flags', "nocaves", true)
end)
dofile(fun_caves_mod.path .. "/mapgen.lua")
dofile(fun_caves_mod.path .. "/abms.lua")