Cooperate with Ramoid.

This commit is contained in:
Duane Robertson 2017-02-17 19:21:47 -06:00
parent 2186b24632
commit f1f0abcc16
3 changed files with 32 additions and 4 deletions

View file

@ -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))