forked from mtcontrib/led_marquee
check for "get" and "get_string" in the right place :-P
This commit is contained in:
parent
d9499481cf
commit
4af469f1aa
8
init.lua
8
init.lua
@ -201,6 +201,10 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
||||
led_marquee.set_timer(pos, timeout)
|
||||
elseif msg == "scroll_step" then
|
||||
led_marquee.scroll_text(pos)
|
||||
elseif msg == "get" then -- get the master panel's displayed char as ASCII numerical value
|
||||
digiline:receptor_send(pos, digiline.rules.default, channel, tonumber(string.match(minetest.get_node(pos).name,"led_marquee:char_(.+)"))) -- wonderfully horrible string manipulaiton
|
||||
elseif msg == "getstr" then -- get the last stored message
|
||||
digiline:receptor_send(pos, digiline.rules.default, channel, meta:get_string("last_msg"))
|
||||
else
|
||||
led_marquee.set_timer(pos, 0)
|
||||
meta:set_string("last_msg", msg)
|
||||
@ -214,10 +218,6 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
||||
elseif asc < 28 then
|
||||
last_color = asc
|
||||
meta:set_int("last_color", asc)
|
||||
elseif msg == "get" then -- get the master panel's displayed char as ASCII numerical value
|
||||
digiline:receptor_send(pos, digiline.rules.default, channel, tonumber(string.match(minetest.get_node(pos).name,"led_marquee:char_(.+)"))) -- wonderfully horrible string manipulaiton
|
||||
elseif msg == "getstr" then -- get the last stored message
|
||||
digiline:receptor_send(pos, digiline.rules.default, channel, meta:get_string("last_msg"))
|
||||
end
|
||||
end
|
||||
elseif msg and type(msg) == "number" then
|
||||
|
Loading…
Reference in New Issue
Block a user