Compare commits
13 Commits
b081594e2c
...
52e4fe1b0b
Author | SHA1 | Date | |
---|---|---|---|
52e4fe1b0b | |||
2bf2651cee | |||
aafa748f92 | |||
efb6d93204 | |||
39f571f788 | |||
c09527c029 | |||
0f31f4832c | |||
108f0dad1a | |||
023966f9c4 | |||
63de1f5ab5 | |||
79bc4755dd | |||
642aec419a | |||
caf6e24d04 |
13
init.lua
@ -103,7 +103,12 @@ local char_to_color = {
|
|||||||
-- the following functions based on the so-named ones in Jeija's digilines mod
|
-- the following functions based on the so-named ones in Jeija's digilines mod
|
||||||
|
|
||||||
local reset_meta = function(pos)
|
local reset_meta = function(pos)
|
||||||
minetest.get_meta(pos):set_string("formspec", "field[channel;Channel;${channel}]")
|
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}]"
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
local on_digiline_receive_std = function(pos, node, channel, msg)
|
local on_digiline_receive_std = function(pos, node, channel, msg)
|
||||||
@ -360,7 +365,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
|||||||
led_marquee.set_timer(pos, 0)
|
led_marquee.set_timer(pos, 0)
|
||||||
return
|
return
|
||||||
elseif string.sub(msg, 1, 12) == "scroll_speed" then
|
elseif string.sub(msg, 1, 12) == "scroll_speed" then
|
||||||
local timeout = tonumber(string.sub(msg, 13))
|
local timeout = tonumber(string.sub(msg, 13)) or 0
|
||||||
led_marquee.set_timer(pos, math.max(timeout, led_marquee.message_minimum_time))
|
led_marquee.set_timer(pos, math.max(timeout, led_marquee.message_minimum_time))
|
||||||
elseif string.sub(msg, 1, 11) == "scroll_step" then
|
elseif string.sub(msg, 1, 11) == "scroll_step" then
|
||||||
local skip = tonumber(string.sub(msg, 12))
|
local skip = tonumber(string.sub(msg, 12))
|
||||||
@ -383,7 +388,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
local asc = string.byte(msg)
|
local asc = string.byte(msg)
|
||||||
if asc > 29 and asc < 256 then
|
if asc > 30 and asc < 256 then
|
||||||
minetest.swap_node(pos, { name = "led_marquee:char_"..asc, param2 = fdir + (last_color*8)})
|
minetest.swap_node(pos, { name = "led_marquee:char_"..asc, param2 = fdir + (last_color*8)})
|
||||||
meta:set_string("last_msg", tostring(msg))
|
meta:set_string("last_msg", tostring(msg))
|
||||||
meta:set_int("index", 1)
|
meta:set_int("index", 1)
|
||||||
@ -432,7 +437,7 @@ for i = 31, 255 do
|
|||||||
inventory_image = wimage,
|
inventory_image = wimage,
|
||||||
wield_image = wimage,
|
wield_image = wimage,
|
||||||
palette="led_marquee_palette.png",
|
palette="led_marquee_palette.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
groups = groups,
|
groups = groups,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "colorwallmounted",
|
paramtype2 = "colorwallmounted",
|
||||||
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 83 B |