-- See: https://github.com/minetest/minetest/issues/12829#issuecomment-1267576768
core.set_mapgen_setting("mg_flags", "caves, dungeons, light, decorations, biomes, ores", true)
core.set_mapgen_setting("mgv7_spflags", "mountains, ridges, floatlands, caverns", true)
core.set_mapgen_setting("mgv7_floatland_ymin", 1096, true)
core.set_mapgen_setting("mgv7_floatland_ymax", 8192, true)
core.set_mapgen_setting("mgv7_floatland_taper", 0, true)

local path = core.get_modpath("yams_mapgen") .. "/"

dofile(path .. "ores.lua")
dofile(path .. "nether_ores.lua")
dofile(path .. "dungeon.lua")
dofile(path .. "loot_tables.lua")
dofile(path .. "loot.lua")

if core.registered_nodes["tsm_pyramids:yams_mob_spot"] then
    dofile(path .. "pyramid.lua")
end

print("yams_mapgen loaded")
