mirror of
https://github.com/mt-mods/led_marquee.git
synced 2024-12-29 00:47:28 +01:00
don't reset scroll position if re-printing the same message
This commit is contained in:
parent
bbb2b57328
commit
589ab5f19a
5
init.lua
5
init.lua
@ -341,9 +341,12 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
||||
else
|
||||
msg = string.gsub(msg, "//", string.char(30))
|
||||
led_marquee.set_timer(pos, 0)
|
||||
local last_msg = meta:get_string("last_msg")
|
||||
meta:set_string("last_msg", msg)
|
||||
led_marquee.display_msg(pos, channel, msg)
|
||||
meta:set_int("index", 1)
|
||||
if last_msg ~= msg then
|
||||
meta:set_int("index", 1)
|
||||
end
|
||||
end
|
||||
else
|
||||
local asc = string.byte(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user