mirror of
https://github.com/minetest-mods/maptools.git
synced 2024-12-24 08:20:21 +01:00
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)
|
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||||
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
if puncher:get_wielded_item():get_name() == "maptools:pick_admin"
|
||||||
and minetest.env:get_node(pos).name ~= "air" then
|
and minetest.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.log("action", minetest.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.
|
minetest.remove_node(pos) -- The node is removed directly, which means it even works on non-empty containers and group-less nodes.
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user