fixed numerous bugs thanks to @asl97

This commit is contained in:
kaadmy 2015-10-01 12:34:49 -07:00
parent 3f7ad2db09
commit 48bc9df02a
2 changed files with 4 additions and 6 deletions

View File

@ -878,16 +878,14 @@ minetest.register_tool(
if pointed_thing.type ~= "node" then return end
local pos = pointed_thing.under
local node = minetest.get_node(pointed_thing.under)
local node = minetest.get_node(pos)
local nodename = node.name
if nodename == "default:torch_weak" then
local n = minetest.get_node(pos)
minetest.set_node(pos, {name = "default:torch", param = n.param, param2 = n.param2})
minetest.set_node(pos, {name = "default:torch", param = node.param, param2 = node.param2})
itemstack:add_wear(800)
elseif nodename == "default:torch_dead" then
local n = minetest.get_node(pos)
minetest.set_node(pos, {name = "default:torch_weak", param = n.param, param2 = n.param2})
minetest.set_node(pos, {name = "default:torch_weak", param = node.param, param2 = node.param2})
itemstack:add_wear(800)
elseif nodename == "tnt:tnt" then
local y = minetest.registered_nodes["tnt:tnt"]

View File

@ -5,7 +5,7 @@
locks = {}
locks.picked_time = tonumber(minetest.setting_getbool("locks_picked_time")) or 15 -- unlocked for 15 seconds
locks.picked_time = tonumber(minetest.setting_get("locks_picked_time")) or 15 -- unlocked for 15 seconds
local all_unlocked = minetest.setting_getbool("locks_all_unlocked")