diff --git a/abms.lua b/abms.lua index 608dc1d..03e58a8 100644 --- a/abms.lua +++ b/abms.lua @@ -197,6 +197,26 @@ minetest.register_abm({ end }) +-- * Replace this with an after_destruct call * +--minetest.register_abm({ +-- nodenames = {"fun_caves:giant_mushroom_cap", "fun_caves:huge_mushroom_cap"}, +-- interval = time_factor, +-- chance = 20, +-- action = function(pos, node) +-- if not (pos and node) then +-- return +-- end +-- +-- pos.y = pos.y - 1 +-- local node_below = minetest.get_node_or_nil(pos) +-- if not (node_below and node_below.name == 'fun_caves:giant_mushroom_stem') then +-- pos.y = pos.y + 1 +-- minetest.remove_node(pos) +-- return +-- end +-- end +--}) + --minetest.register_abm({ -- nodenames = {"fire:basic_flame"}, -- interval = 2 * time_factor, diff --git a/depends.txt b/depends.txt index d679a20..ee2bfb6 100644 --- a/depends.txt +++ b/depends.txt @@ -3,6 +3,7 @@ bucket? dye flowers mobs? +ramoid? underworlds? vessels wooden_bucket? diff --git a/mapgen.lua b/mapgen.lua index 4a05d36..f14d6a4 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -177,7 +177,14 @@ local function generate(p_minp, p_maxp, seed) local write - if underworlds_mod and underworlds_mod.underzones then + if minetest.get_modpath('ramoid') and ramoid_mod and ramoid_mod.ramoid_depth then + local avg = (minp.y + maxp.y) / 2 + if avg > (ramoid_mod.ramoid_depth - 1) * 80 - 32 and avg < ramoid_mod.ramoid_depth * 80 - 32 then + return + end + end + + if minetest.get_modpath('underworlds') and underworlds_mod and underworlds_mod.underzones then local avg = (minp.y + maxp.y) / 2 for _, uz in pairs(underworlds_mod.underzones) do if avg <= uz.upper_bound and avg >= uz.lower_bound then @@ -256,9 +263,9 @@ end local function pgenerate(...) - --local status, err = pcall(generate, ...) - local status, err = true - generate(...) + local status, err = pcall(generate, ...) + --local status, err = true + --generate(...) if not status then print('Fun Caves: Could not generate terrain:') print(dump(err))