From 39655c4f5d6657a8cc2359683953c2c1ae2e48c7 Mon Sep 17 00:00:00 2001 From: kaeza Date: Fri, 25 Oct 2013 17:22:14 -0200 Subject: [PATCH] Remove reference to deprecated method `get_entity_name'. --- signs_lib.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/signs_lib.lua b/signs_lib.lua index dc8149cb..9c4b449b 100644 --- a/signs_lib.lua +++ b/signs_lib.lua @@ -328,7 +328,8 @@ end homedecor.destruct_sign = function(pos) local objects = minetest.get_objects_inside_radius(pos, 0.5) for _, v in ipairs(objects) do - if v:get_entity_name() == "signs:text" then + local e = v:get_luaentity() + if e and e.name == "signs:text" then v:remove() end end @@ -352,7 +353,8 @@ homedecor.update_sign = function(pos, fields) local text = meta:get_string("text") local objects = minetest.get_objects_inside_radius(pos, 0.5) for _, v in ipairs(objects) do - if v:get_entity_name() == "signs:text" then + local e = v:get_luaentity() + if e and e.name == "signs:text" then set_obj_text(v, text) return end