Dungeons generate less aggressively now

This commit is contained in:
Wuzzy 2017-05-24 21:15:57 +02:00
parent 839a407c90
commit 73b7e1d550

@ -191,9 +191,12 @@ minetest.register_on_generated(function(minp, maxp)
local chestSlotCounter = 1 local chestSlotCounter = 1
for tx = x, maxx do for tx = x, maxx do
for tz = z, maxz do for tz = z, maxz do
for ty = y, maxy do for ty = y, maxy do
local p_pos = area:index(tx, ty, tz) local p_pos = area:index(tx, ty, tz)
-- Do not overwrite nodes with is_ground_content == false (e.g. bedrock)
local name = minetest.get_name_from_content_id(data[p_pos])
if minetest.registered_nodes[name].is_ground_content then
-- Floor -- Floor
if ty == y then if ty == y then
if math.random(1,4) == 1 then if math.random(1,4) == 1 then
@ -229,6 +232,8 @@ minetest.register_on_generated(function(minp, maxp)
end end
end end
end end
end
end end
end end
end end