forked from mtcontrib/signs_lib
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",
|
mesh = "signs_lib_standard_sign_entity_wall.obj",
|
||||||
textures = {},
|
textures = {},
|
||||||
static_save = true,
|
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)
|
function signs_lib.delete_objects(pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user