remove sign entity if sign is gone (due to voxelmanip or such) (#9)

This commit is contained in:
fluxionary 2022-05-10 16:47:15 -07:00 committed by GitHub
parent 14efa6eeb7
commit 4dbfbec96e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -167,7 +167,13 @@ minetest.register_entity("signs_lib:text", {
mesh = "signs_lib_standard_sign_entity_wall.obj",
textures = {},
static_save = true,
backface_culling = false
backface_culling = false,
on_activate = function(self)
local node = minetest.get_node(self.object:get_pos())
if minetest.get_item_group(node.name, "sign") == 0 then
self.object:remove()
end
end,
})
function signs_lib.delete_objects(pos)