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:
parent
14efa6eeb7
commit
4dbfbec96e
8
api.lua
8
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user