Add extra coffers when generating dungeon.
As a reward for pressing on.
This commit is contained in:
parent
c1c60d1f8b
commit
5f3d97ab0c
2 changed files with 6 additions and 1 deletions
1
abms.lua
1
abms.lua
|
@ -344,6 +344,7 @@ minetest.register_abm({
|
|||
nodenames = {"fun_caves:coffer"},
|
||||
interval = 2,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(p0, node, _, _)
|
||||
minetest.remove_node(p0)
|
||||
end,
|
||||
|
|
|
@ -408,7 +408,11 @@ fun_caves.dungeon = function(minp_in, maxp_in, data, p2data, area, node, heightm
|
|||
elseif ry == (cell_size - 1) and (cy < (cells_y - 1) or not centered_in) then
|
||||
data[ivm] = node['fun_caves:dungeon_floor_2']
|
||||
elseif content[cx][cy][cz] == 'room' then
|
||||
data[ivm] = node['air']
|
||||
if math.random(1000) == 1 and data[ivm - area.ystride] == node['fun_caves:dungeon_floor_1'] then
|
||||
data[ivm] = node['fun_caves:coffer']
|
||||
else
|
||||
data[ivm] = node['air']
|
||||
end
|
||||
elseif content[cx][cy][cz] == '4way' and ry <= 2 and (rz == 2 or rz == 3 or rx == 2 or rx == 3) and (ox + rx >= minp.x + 2 and ox + rx <= maxp.x - 2 and oz + rz >= minp.z + 2 and oz + rz <= maxp.z - 2) then
|
||||
data[ivm] = node['air']
|
||||
elseif ry > 0 and content[cx][cy][cz] == '4way' then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue