diff --git a/dungeon.lua b/dungeon.lua index 91135bd..f7f0c46 100644 --- a/dungeon.lua +++ b/dungeon.lua @@ -118,12 +118,22 @@ newnode.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local ready = meta:get_string('formspec') if treasures and ready == '' then + if minetest.get_modpath('tnt') and math.random(20) == 1 then + minetest.set_node(pos, {name = 'tnt:tnt_burning'}) + local timer = minetest.get_node_timer(pos) + if timer then + timer:start(5) + end + minetest.sound_play("default_dig_crumbly", {pos = pos, gain = 0.5, max_hear_distance = 10}) + return + end + meta:set_string("formspec", chest_formspec) local inv = meta:get_inventory() inv:set_size("main", 8*4) local something for i = 1, 100 do - for j = 1, 3 * depth do + for j = 1, 5 * depth do for _, tre in pairs(treasures) do if tre.name and tre.level and tre.rarity and tre.level <= level and math.random(tre.rarity) == 1 then inv:add_item('main', tre.name) diff --git a/nodes.lua b/nodes.lua index 36b78f0..473e499 100644 --- a/nodes.lua +++ b/nodes.lua @@ -9,9 +9,6 @@ function minetest.is_protected(pos, name) end local node = get_node_or_nil(pos) - if node and get_item_group(node.name, "dungeon") ~= 0 then - return true - end if node and node.name == 'fun_caves:translocator' and (name == '' or not minetest.get_player_by_name(name)) then return true end