Fix crash if a PI is paired to an uninitialized controller

This commit is contained in:
cheapie 2024-04-27 20:32:02 -05:00
parent 1e2c5e046c
commit 7077022b3e

View File

@ -116,6 +116,7 @@ function celevator.pi.flash(pos,what)
end
function celevator.pi.settext(pos,text)
if not text then text = " --" end
if minetest.get_item_group(celevator.get_node(pos).name,"_celevator_pi") ~= 1 then return end
local meta = minetest.get_meta(pos)
if string.len(text) < 3 then