summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2015-08-23 10:43:11 +0200
committerJeija <norrepli@gmail.com>2015-08-23 10:43:11 +0200
commit69e1d1ba9b2437790fbeb9f250086ed4a0cdebbb (patch)
treed102f990a2c77607e8e885918fda95ef0e62d97c
parente2b9141ccc0217639fdbc47b6185ef60e2ce73e8 (diff)
parentbedfa586723c00bba3a164f6b061eca83fef776b (diff)
Merge branch 'Rui914-patch-1'
-rw-r--r--digilines_lcd/init.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/digilines_lcd/init.lua b/digilines_lcd/init.lua
index 407060b..ade3fca 100644
--- a/digilines_lcd/init.lua
+++ b/digilines_lcd/init.lua
@@ -39,14 +39,15 @@ end
local clearscreen = function(pos)
local objects = minetest.get_objects_inside_radius(pos, 0.5)
for _, o in ipairs(objects) do
- if o:get_entity_name() == "digilines_lcd:text" then
+ local o_entity = o:get_luaentity()
+ if o_entity and o_entity.name == "digilines_lcd:text" then
o:remove()
end
end
end
local prepare_writing = function(pos)
- lcd_info = lcds[minetest.get_node(pos).param2]
+ local lcd_info = lcds[minetest.get_node(pos).param2]
if lcd_info == nil then return end
local text = minetest.add_entity(
{x = pos.x + lcd_info.delta.x,