Don't generate terrain before dungeon.
This commit is contained in:
parent
77a6129e00
commit
be7d7a1976
4 changed files with 65 additions and 20 deletions
26
mapgen.lua
26
mapgen.lua
|
@ -429,6 +429,16 @@ local function generate(p_minp, p_maxp, seed)
|
|||
break
|
||||
end
|
||||
|
||||
if not underzone and fun_caves.dungeon and not (fun_caves.is_tree and fun_caves.is_tree(minp)) then
|
||||
local write_dungeon, write_p4
|
||||
write_dungeon, write_p4 = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
|
||||
if write_dungeon then
|
||||
write = true
|
||||
write_p2 = write_p2 or write_p4
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local biomemap
|
||||
if fun_caves.cavegen and fun_caves.decogen then
|
||||
local h2, write_cave
|
||||
|
@ -455,16 +465,6 @@ local function generate(p_minp, p_maxp, seed)
|
|||
end
|
||||
end
|
||||
|
||||
if not underzone and fun_caves.dungeon then
|
||||
local write_dungeon, write_p4
|
||||
write_dungeon, write_p4 = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
|
||||
if write_dungeon then
|
||||
write = true
|
||||
write_p2 = write_p2 or write_p4
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if fun_caves.pyramid then
|
||||
local write_pyr, write_p4 = fun_caves.pyramid(minp, maxp, data, p2data, area, biomemap, biome_ids, node, heightmap)
|
||||
if write_pyr then
|
||||
|
@ -521,9 +521,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