1
0
mirror of https://github.com/mt-mods/signs_lib.git synced 2024-11-05 01:20:18 +01:00

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

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)