only remove display entity after digging
fixes pandorabox-io/pandorabox.io#617
This commit is contained in:
parent
40fc6ef8cf
commit
3a3b225726
10
init.lua
10
init.lua
@ -472,7 +472,10 @@ minetest.register_node("protector:protect", {
|
|||||||
after_destruct = function(pos, oldnode)
|
after_destruct = function(pos, oldnode)
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||||
for _, v in ipairs(objects) do
|
for _, v in ipairs(objects) do
|
||||||
v:remove()
|
local ent = v:get_luaentity()
|
||||||
|
if ent and ent.name == "protector:display" then
|
||||||
|
v:remove()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -574,7 +577,10 @@ minetest.register_node("protector:protect2", {
|
|||||||
after_destruct = function(pos, oldnode)
|
after_destruct = function(pos, oldnode)
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
local objects = minetest.get_objects_inside_radius(pos, 0.5)
|
||||||
for _, v in ipairs(objects) do
|
for _, v in ipairs(objects) do
|
||||||
v:remove()
|
local ent = v:get_luaentity()
|
||||||
|
if ent and ent.name == "protector:display" then
|
||||||
|
v:remove()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user