local mod_name = minetest.get_current_modname()
local mod_path = minetest.get_modpath(mod_name)

pmb_mirecaves = {}
pmb_mirecaves.max = 100
-- pmb_mirecaves.max = pmb_vars.overworld.sea_level - 30
pmb_mirecaves.min = pmb_vars.overworld.sea_level - 40

pmb_mirecaves.biome_list = {"mirecaves"}

pmb_mirecaves.mg_name = minetest.get_mapgen_setting("mg_name")

-- util
dofile(mod_path .. DIR_DELIM .. "utilities.lua")

-- nodes
dofile(mod_path .. DIR_DELIM .. "nodes" .. DIR_DELIM .. "stone.lua")
dofile(mod_path .. DIR_DELIM .. "nodes" .. DIR_DELIM .. "nolmer.lua")
dofile(mod_path .. DIR_DELIM .. "scripts" .. DIR_DELIM .. "nolmer_growing.lua")
dofile(mod_path .. DIR_DELIM .. "nodes" .. DIR_DELIM .. "workaround.lua")

-- mapgen
-- dofile(mod_path .. DIR_DELIM .. "mapgen" .. DIR_DELIM .. "clearer.lua")
-- dofile(mod_path .. DIR_DELIM .. "mapgen" .. DIR_DELIM .. "streams.lua")
-- dofile(mod_path .. DIR_DELIM .. "mapgen" .. DIR_DELIM .. "soils.lua")


dofile(mod_path .. DIR_DELIM .. "mapgen" .. DIR_DELIM .. "biome.lua")
-- decor
dofile(mod_path .. DIR_DELIM .. "mapgen" .. DIR_DELIM .. "cleaner.lua")

if minetest.get_modpath("pmb_map_base") and minetest.get_modpath("pmb_stone") then
    pmb_stone.register_ores_for_node("pmb_mirecaves:stone")
    pmb_map_base.register_ores_for_node("pmb_mirecaves:stone", {
        skip = {
            coal = true,
            iron = true,
        }
    })
end
