Cooperate with Ramoid.
This commit is contained in:
parent
2186b24632
commit
f1f0abcc16
3 changed files with 32 additions and 4 deletions
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