1
0
mirror of https://github.com/mt-mods/signs_lib.git synced 2025-06-28 22:06:20 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
d71dcf4874 add text check for entity creation 2021-02-19 09:33:14 +00:00

View File

@ -252,8 +252,11 @@ function signs_lib.set_obj_text(pos, text)
local text_ansi = Utf8ToAnsi(text)
local n = minetest.registered_nodes[minetest.get_node(pos).name]
signs_lib.delete_objects(pos)
-- only create sign entity for actual text
if text_ansi and text_ansi ~= "" then
signs_lib.spawn_entity(pos, signs_lib.make_sign_texture(split(text_ansi), pos) )
end
end
-- rotation