mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-08-20 14:04:10 +02:00
[mcl_dungeons] Remove empty code section, add debug info
This commit is contained in:
parent
80d845adb6
commit
d1a0299b92
@ -247,7 +247,7 @@ local function ecb_spawn_dungeon(blockpos, action, calls_remaining, param)
|
|||||||
if forChest and (currentChest < totalChests + 1) and (chestSlots[currentChest] == chestSlotCounter) then
|
if forChest and (currentChest < totalChests + 1) and (chestSlots[currentChest] == chestSlotCounter) then
|
||||||
currentChest = currentChest + 1
|
currentChest = currentChest + 1
|
||||||
table.insert(chests, {x=tx, y=ty, z=tz})
|
table.insert(chests, {x=tx, y=ty, z=tz})
|
||||||
else
|
-- else
|
||||||
--minetest.swap_node(p, {name = "air"})
|
--minetest.swap_node(p, {name = "air"})
|
||||||
end
|
end
|
||||||
if forChest then
|
if forChest then
|
||||||
@ -265,8 +265,8 @@ local function ecb_spawn_dungeon(blockpos, action, calls_remaining, param)
|
|||||||
-- Detect the 4 horizontal neighbors
|
-- Detect the 4 horizontal neighbors
|
||||||
local spos = vector.add(pos, surround_vectors[s])
|
local spos = vector.add(pos, surround_vectors[s])
|
||||||
local wpos = vector.subtract(pos, surround_vectors[s])
|
local wpos = vector.subtract(pos, surround_vectors[s])
|
||||||
local nodename = minetest.get_node(spos).name
|
local nodename = get_node(spos).name
|
||||||
local nodename2 = minetest.get_node(wpos).name
|
local nodename2 = get_node(wpos).name
|
||||||
local nodedef = minetest.registered_nodes[nodename]
|
local nodedef = minetest.registered_nodes[nodename]
|
||||||
local nodedef2 = minetest.registered_nodes[nodename2]
|
local nodedef2 = minetest.registered_nodes[nodename2]
|
||||||
-- The chest needs an open space in front of it and a walkable node (except chest) behind it
|
-- The chest needs an open space in front of it and a walkable node (except chest) behind it
|
||||||
@ -347,6 +347,7 @@ local function ecb_spawn_dungeon(blockpos, action, calls_remaining, param)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.log("action", "[mcl_dungeons] Filling chest " .. tostring(c) .. " at " .. minetest.pos_to_string(pos))
|
||||||
mcl_loot.fill_inventory(meta:get_inventory(), "main", mcl_loot.get_multi_loot(loottable, pr), pr)
|
mcl_loot.fill_inventory(meta:get_inventory(), "main", mcl_loot.get_multi_loot(loottable, pr), pr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user