fixed numerous bugs thanks to @asl97
This commit is contained in:
parent
3f7ad2db09
commit
48bc9df02a
@ -878,16 +878,14 @@ minetest.register_tool(
|
|||||||
if pointed_thing.type ~= "node" then return end
|
if pointed_thing.type ~= "node" then return end
|
||||||
|
|
||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
local node = minetest.get_node(pointed_thing.under)
|
local node = minetest.get_node(pos)
|
||||||
local nodename = node.name
|
local nodename = node.name
|
||||||
|
|
||||||
if nodename == "default:torch_weak" then
|
if nodename == "default:torch_weak" then
|
||||||
local n = minetest.get_node(pos)
|
minetest.set_node(pos, {name = "default:torch", param = node.param, param2 = node.param2})
|
||||||
minetest.set_node(pos, {name = "default:torch", param = n.param, param2 = n.param2})
|
|
||||||
itemstack:add_wear(800)
|
itemstack:add_wear(800)
|
||||||
elseif nodename == "default:torch_dead" then
|
elseif nodename == "default:torch_dead" then
|
||||||
local n = minetest.get_node(pos)
|
minetest.set_node(pos, {name = "default:torch_weak", param = node.param, param2 = node.param2})
|
||||||
minetest.set_node(pos, {name = "default:torch_weak", param = n.param, param2 = n.param2})
|
|
||||||
itemstack:add_wear(800)
|
itemstack:add_wear(800)
|
||||||
elseif nodename == "tnt:tnt" then
|
elseif nodename == "tnt:tnt" then
|
||||||
local y = minetest.registered_nodes["tnt:tnt"]
|
local y = minetest.registered_nodes["tnt:tnt"]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
locks = {}
|
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")
|
local all_unlocked = minetest.setting_getbool("locks_all_unlocked")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user