mirror of
https://github.com/mt-mods/led_marquee.git
synced 2024-11-30 19:13:47 +01:00
use proper form of digilines.receptor_send()
This commit is contained in:
parent
b8a0f1cbb7
commit
b25b3ef995
6
init.lua
6
init.lua
@ -202,11 +202,11 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
|||||||
elseif msg == "scroll_step" then
|
elseif msg == "scroll_step" then
|
||||||
led_marquee.scroll_text(pos)
|
led_marquee.scroll_text(pos)
|
||||||
elseif msg == "get" then -- get the master panel's displayed char as ASCII numerical value
|
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
|
digilines.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
|
elseif msg == "getstr" then -- get the last stored message
|
||||||
digiline:receptor_send(pos, digiline.rules.default, channel, meta:get_string("last_msg"))
|
digilines.receptor_send(pos, digiline.rules.default, channel, meta:get_string("last_msg"))
|
||||||
elseif msg == "getindex" then -- get the scroll index
|
elseif msg == "getindex" then -- get the scroll index
|
||||||
digiline:receptor_send(pos, digiline.rules.default, channel, meta:get_int("index"))
|
digilines.receptor_send(pos, digiline.rules.default, channel, meta:get_int("index"))
|
||||||
else
|
else
|
||||||
led_marquee.set_timer(pos, 0)
|
led_marquee.set_timer(pos, 0)
|
||||||
meta:set_string("last_msg", msg)
|
meta:set_string("last_msg", msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user