Skip to content

Commit

Permalink
fix signs not removing text entity when dug
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Aug 3, 2024
1 parent e767c56 commit 71c309b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mods/fl_signs/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}
})

Expand Down

0 comments on commit 71c309b

Please sign in to comment.