Make sign text entity more robust

This commit is contained in:
Wuzzy 2017-07-25 01:01:50 +02:00
parent 5f68f6f7e5
commit 613ea77713

@ -312,11 +312,16 @@ minetest.register_entity("signs:text", {
collisionbox = { 0, 0, 0, 0, 0, 0 }, collisionbox = { 0, 0, 0, 0, 0, 0 },
visual = "upright_sprite", visual = "upright_sprite",
textures = {}, textures = {},
physical = false,
collide_with_objects = false,
on_activate = function(self) on_activate = function(self)
local meta = minetest.get_meta(self.object:getpos()) local meta = minetest.get_meta(self.object:getpos())
local text = meta:get_string("text") local text = meta:get_string("text")
self.object:set_properties({textures={generate_texture(create_lines(text))}}) self.object:set_properties({
textures={generate_texture(create_lines(text))},
})
self.object:set_armor_groups({ immortal = 1 })
end end
}) })