From 71c309b4ec8c997740bca85517462754311ef87a Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:12:42 -0400 Subject: [PATCH] fix signs not removing text entity when dug --- mods/fl_signs/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mods/fl_signs/init.lua b/mods/fl_signs/init.lua index 44d4f88..b88600f 100644 --- a/mods/fl_signs/init.lua +++ b/mods/fl_signs/init.lua @@ -131,6 +131,18 @@ minetest.register_node("fl_signs:sign_wood", { if pointed_thing.under.y+1 == pointed_thing.above.y then return itemstack end return minetest.item_place(itemstack, placer, pointed_thing) end, + on_dig = function(pos, node, digger) + local ents = minetest.get_objects_inside_radius(pos, 0.5) + + for _, ent in pairs(ents) do + local entn = ent:get_luaentity().name + if entn == "fl_signs:text" then + ent:remove() + end + end + + return minetest.node_dig(pos, node, digger) + end, groups = {sign = 1, dig_generic = 4} })