Localize variables. Prevent shafts from damaging trees.
This commit is contained in:
parent
61c3cb0edd
commit
2270e87a71
2 changed files with 11 additions and 9 deletions
10
mapgen.lua
10
mapgen.lua
|
@ -430,18 +430,20 @@ local function generate(p_minp, p_maxp, seed)
|
|||
end
|
||||
|
||||
if fun_caves.dungeon then
|
||||
write, write_p2 = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
|
||||
if write then
|
||||
local full
|
||||
write, write_p2, full = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
|
||||
if write and full then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if fun_caves.cavegen and fun_caves.decogen then
|
||||
local h2
|
||||
write, h2 = fun_caves.cavegen(minp, maxp, data, area, node, heightmap, underzone, ground_nodes)
|
||||
local h2, write_cave
|
||||
write_cave, h2 = fun_caves.cavegen(minp, maxp, data, area, node, heightmap, underzone, ground_nodes)
|
||||
if h2 then
|
||||
heightmap = h2
|
||||
end
|
||||
write = write or write_cave
|
||||
|
||||
local biomemap
|
||||
if fun_caves.use_bi_hi then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue