diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 6538436..5532f89 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -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"] diff --git a/mods/locks/init.lua b/mods/locks/init.lua index f9e534a..cef9fef 100644 --- a/mods/locks/init.lua +++ b/mods/locks/init.lua @@ -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")