From df1a6aaf1ed9251ebc5d942f45b8ae151ad28c7c Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 19 Sep 2019 20:56:54 -0400 Subject: [PATCH] update homedecor and ilights again --- homedecor_lighting/init.lua | 2 +- ilights/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homedecor_lighting/init.lua b/homedecor_lighting/init.lua index 7c7fedbe..1aa254bb 100644 --- a/homedecor_lighting/init.lua +++ b/homedecor_lighting/init.lua @@ -103,7 +103,7 @@ if minetest.get_modpath("digilines") then local setchan = meta:get_string("channel") if setchan ~= channel then return end - if msg and msg ~= "" and type(msg) == "string" then + if msg ~= "" and (type(msg) == "string" or type(msg) == "number" ) then local n = tonumber(msg) local suff = word_to_bright[msg] or "invalid" diff --git a/ilights/init.lua b/ilights/init.lua index 0bd9e1d3..fe75d4c8 100644 --- a/ilights/init.lua +++ b/ilights/init.lua @@ -86,7 +86,7 @@ if minetest.get_modpath("digilines") then local setchan = meta:get_string("channel") if setchan ~= channel then return end - if msg and msg ~= "" and type(msg) == "string" then + if msg ~= "" and (type(msg) == "string" or type(msg) == "number" ) then local n = tonumber(msg) if n then msg = (n > 3) and "on" or "off" -- same threshold as in homedecor's lights