mirror of
https://github.com/mt-mods/led_marquee.git
synced 2025-07-19 00:30:31 +02:00
Compare commits
2 Commits
2021-04-14
...
79bc4755dd
Author | SHA1 | Date | |
---|---|---|---|
79bc4755dd | |||
b081594e2c |
12
init.lua
12
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)
|
||||
@ -388,7 +383,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
|
||||
end
|
||||
else
|
||||
local asc = string.byte(msg)
|
||||
if asc > 30 and asc < 256 then
|
||||
if asc > 29 and asc < 256 then
|
||||
minetest.swap_node(pos, { name = "led_marquee:char_"..asc, param2 = fdir + (last_color*8)})
|
||||
meta:set_string("last_msg", tostring(msg))
|
||||
meta:set_int("index", 1)
|
||||
@ -437,7 +432,7 @@ for i = 31, 255 do
|
||||
inventory_image = wimage,
|
||||
wield_image = wimage,
|
||||
palette="led_marquee_palette.png",
|
||||
use_texture_alpha = "blend",
|
||||
use_texture_alpha = true,
|
||||
groups = groups,
|
||||
paramtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
@ -479,3 +474,4 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.log("action", "[led_marquee] loaded.")
|
||||
|
Reference in New Issue
Block a user