forked from mff/maptools
Replace minetest.env: with minetest.
This commit is contained in:
parent
f405ae1595
commit
c979440808
6
init.lua
6
init.lua
|
@ -576,9 +576,9 @@ minetest.register_tool("maptools:pick_admin_with_drops", {
|
|||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
||||
and minetest.env:get_node(pos).name ~= "air" then
|
||||
minetest.log("action", minetest.env:get_node(pos).name .. " was removed using an Admin Pickaxe at " .. minetest.pos_to_string(pos) .. ".")
|
||||
minetest.env:remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
||||
and minetest.get_node(pos).name ~= "air" then
|
||||
minetest.log("action", minetest.get_node(pos).name .. " was removed using an Admin Pickaxe at " .. minetest.pos_to_string(pos) .. ".")
|
||||
minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user