mirror of
https://github.com/mt-mods/led_marquee.git
synced 2024-11-24 08:13:52 +01:00
get_str will now get the last displayed string from the master's meta
(instead of only the first char)
This commit is contained in:
parent
02216ee611
commit
1823b6f0e5
4
init.lua
4
init.lua
@ -216,8 +216,8 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
||||
meta:set_int("last_color", asc)
|
||||
elseif msg == "get" then -- get value 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 actual char
|
||||
digiline:receptor_send(pos, digiline.rules.default, channel, string.char(tonumber(string.match(minetest.get_node(pos).name,"led_marquee:char_(.+)"))))
|
||||
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