1
0
mirror of https://github.com/mt-mods/led_marquee.git synced 2024-11-13 21:30:20 +01:00

fix color range check

This commit is contained in:
Vanessa Dannenberg 2018-08-15 14:28:38 -04:00
parent 06d19f0d2e
commit bd0e7d9bfa

View File

@ -62,7 +62,7 @@ local display_string = function(pos, channel, string)
local pos2 = pos
local mastermeta = minetest.get_meta(pos)
local lastcolor = mastermeta:get_int("lastcolor")
if not lastcolor or lastcolor < 0 or lastcolor > 7 then
if not lastcolor or lastcolor < 0 or lastcolor > 30 then
lastcolor = 0
mastermeta:set_int("lastcolor", 0)
end
@ -87,7 +87,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
local setchan = meta:get_string("channel")
local lastcolor = meta:get_int("lastcolor")
if not lastcolor or lastcolor < 0 or lastcolor > 7 then
if not lastcolor or lastcolor < 0 or lastcolor > 30 then
lastcolor = 0
meta:set_int("lastcolor", 0)
end