From 4dbfbec96e64d17be9c7834618b77611d72d2f7d Mon Sep 17 00:00:00 2001 From: fluxionary <25628292+fluxionary@users.noreply.github.com> Date: Tue, 10 May 2022 16:47:15 -0700 Subject: [PATCH] remove sign entity if sign is gone (due to voxelmanip or such) (#9) --- api.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index a4eb208..0a55cd3 100644 --- a/api.lua +++ b/api.lua @@ -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)