mirror of
https://github.com/mt-mods/led_marquee.git
synced 2025-07-19 00:30:31 +02:00
Compare commits
1 Commits
2021-02-25
...
b081594e2c
Author | SHA1 | Date | |
---|---|---|---|
b081594e2c |
10
init.lua
10
init.lua
@ -103,12 +103,7 @@ local char_to_color = {
|
||||
-- the following functions based on the so-named ones in Jeija's digilines mod
|
||||
|
||||
local reset_meta = function(pos)
|
||||
minetest.get_meta(pos):set_string("formspec",
|
||||
"formspec_version[4]"..
|
||||
"size[8,4]"..
|
||||
"button_exit[3,2.5;2,0.5;proceed;Proceed]"..
|
||||
"field[1.75,1.5;4.5,0.5;channel;Channel;${channel}]"
|
||||
)
|
||||
minetest.get_meta(pos):set_string("formspec", "field[channel;Channel;${channel}]")
|
||||
end
|
||||
|
||||
local on_digiline_receive_std = function(pos, node, channel, msg)
|
||||
@ -365,7 +360,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
||||
led_marquee.set_timer(pos, 0)
|
||||
return
|
||||
elseif string.sub(msg, 1, 12) == "scroll_speed" then
|
||||
local timeout = tonumber(string.sub(msg, 13)) or 0
|
||||
local timeout = tonumber(string.sub(msg, 13))
|
||||
led_marquee.set_timer(pos, math.max(timeout, led_marquee.message_minimum_time))
|
||||
elseif string.sub(msg, 1, 11) == "scroll_step" then
|
||||
local skip = tonumber(string.sub(msg, 12))
|
||||
@ -479,3 +474,4 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.log("action", "[led_marquee] loaded.")
|
||||
|
Reference in New Issue
Block a user