1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2025-06-28 22:26:41 +02:00

destroy sign entities if sign node is exploded

This commit is contained in:
flux
2022-10-26 10:32:25 -07:00
parent 4d483563f6
commit 41f2eaaabb
4 changed files with 18 additions and 0 deletions

View File

@ -289,6 +289,16 @@ function display_api.on_destruct(pos)
end
end
function display_api.on_blast(pos, intensity)
if not minetest.is_protected(pos, "tnt:blast") then
local node = minetest.get_node(pos)
local drops = minetest.get_node_drops(node, "tnt:blast")
minetest.remove_node(pos)
display_api.on_destruct(pos)
return drops
end
end
-- On_rotate (screwdriver) callback for display_api items. Prevents invalid
-- rotations and reorients entities.
function display_api.on_rotate(pos, node, user, _, new_param2)