From ab5e9805114b887db5a20efe809479030b859151 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Sat, 2 Jan 2021 15:24:34 +0100 Subject: [PATCH] Fix bugs in display API - Don't hardcode display node names in API function - Fix a bug where the wrong variable is used --- icta_controller/display.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icta_controller/display.lua b/icta_controller/display.lua index ad8efc6..eda52e9 100644 --- a/icta_controller/display.lua +++ b/icta_controller/display.lua @@ -64,7 +64,7 @@ function techage.display.on_timer(pos) if mem.ticks > 0 then local node = minetest.get_node(pos) -- check if display is loaded and a player in front of the display - if node.name == "techage:ta4_display" or node.name == "techage:ta4_displayXL" then + if node.name ~= "ignore" then local dir = minetest.facedir_to_dir(Param2ToFacedir[node.param2 % 6]) local pos2 = vector.add(pos, vector.multiply(dir, RADIUS)) for _, obj in pairs(minetest.get_objects_inside_radius(pos2, RADIUS)) do @@ -205,7 +205,7 @@ function techage.display.add_line(pos, payload, cycle_time) while #nvm.text >= NUM_ROWS do table.remove(nvm.text, 1) end - table.insert(nvm.text, payload) + table.insert(nvm.text, str) end function techage.display.write_row(pos, payload, cycle_time)