Use dungeons flag in mg_dungeons for MCL2 dungeons

This commit is contained in:
Wuzzy 2020-06-16 02:33:51 +02:00
parent 44dc28d522
commit d0678d33f8
4 changed files with 13 additions and 0 deletions

View File

@ -98,6 +98,9 @@ mcl_vars.mg_end_platform_pos = { x = 100, y = mcl_vars.mg_end_min + 74, z = 0 }
mcl_vars.mg_realm_barrier_overworld_end_max = mcl_vars.mg_end_max
mcl_vars.mg_realm_barrier_overworld_end_min = mcl_vars.mg_end_max - 11
-- Use MineClone 2-style dungeons
mcl_vars.mg_dungeons = true
-- Set default stack sizes
minetest.nodedef_default.stack_max = 64
minetest.craftitemdef_default.stack_max = 64

View File

@ -3,4 +3,5 @@ mcl_core
mcl_chests
mcl_mobs
mcl_mobspawners
mcl_mapgen_core
mobs_mc

View File

@ -3,6 +3,11 @@
local mg_name = minetest.get_mapgen_setting("mg_name")
local pr = PseudoRandom(os.time())
-- Are dungeons disabled?
if mcl_vars.mg_dungeons == false then
return
end
-- Get loot for dungeon chests
local get_loot = function()
local loottable = {

View File

@ -1078,6 +1078,10 @@ local function register_mgv6_decorations()
end
local mg_flags = minetest.settings:get_flags("mg_flags")
-- Inform other mods of dungeon setting for MCL2-style dungeons
mcl_vars.mg_dungeons = mg_flags.dungeons and not superflat
-- Disable builtin dungeons, we provide our own dungeons
mg_flags.dungeons = false