Cooperate with Ramoid.
This commit is contained in:
parent
2186b24632
commit
f1f0abcc16
3 changed files with 32 additions and 4 deletions
20
abms.lua
20
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,
|
||||
|
|
|
@ -3,6 +3,7 @@ bucket?
|
|||
dye
|
||||
flowers
|
||||
mobs?
|
||||
ramoid?
|
||||
underworlds?
|
||||
vessels
|
||||
wooden_bucket?
|
||||
|
|
15
mapgen.lua
15
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue