Shrink fortresses and add non-maze levels.
This commit is contained in:
parent
955d4db7ad
commit
f44735e032
3 changed files with 159 additions and 76 deletions
|
@ -52,8 +52,7 @@ fun_caves.is_fortress = function(pos, cs)
|
|||
local y = math.floor((pos.y + offset) / cs.y)
|
||||
|
||||
-- Fortresses show up below ground.
|
||||
-- Calls from the first dungeon level should return false.
|
||||
if y > fortress_depth or (pos.y + offset) % cs.y > cs.y - 5 then
|
||||
if y > fortress_depth then
|
||||
return false
|
||||
end
|
||||
|
||||
|
@ -61,9 +60,7 @@ fun_caves.is_fortress = function(pos, cs)
|
|||
local z = math.floor((pos.z + offset) / cs.z)
|
||||
|
||||
local n = minetest.get_perlin(fortress_noise):get3d({x=x, y=y, z=z})
|
||||
if fun_caves.DEBUG and math.floor((n * 10000) % 4) == 1 then
|
||||
return true
|
||||
elseif math.floor((n * 10000) % 19) == 1 then
|
||||
if math.floor((n * 10000) % (fun_caves.DEBUG and 4 or 19)) == 1 then
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue