Compare commits

...

5 Commits

Author SHA1 Message Date
Vanessa Dannenberg 2bf2651cee Merge branch 'BuckarooBanzai-master-patch-93143' into 'master'
check proper `asc` range in digilines events too

See merge request VanessaE/led_marquee!7
2021-03-15 14:38:12 +00:00
Buckaroo Banzai aafa748f92 check proper `asc` range in digilines events too
fixes https://github.com/pandorabox-io/pandorabox.io/issues/629
2021-03-15 08:44:32 +00:00
Vanessa Dannenberg 39f571f788 Merge branch 'master' into 'master'
Fix deprecated use of use_texture_alpha

See merge request VanessaE/led_marquee!6
2021-02-27 05:14:01 +00:00
sys4 108f0dad1a Fix deprecated use of use_texture_alpha 2021-02-27 01:46:36 +01:00
Vanessa Dannenberg 63de1f5ab5 Don't allow engine to add the implicit "Proceed" button
(this change makes it possible to theme the formspec)
2021-02-25 02:08:22 -05:00
1 changed files with 8 additions and 3 deletions

View File

@ -103,7 +103,12 @@ 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", "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
local on_digiline_receive_std = function(pos, node, channel, msg)
@ -383,7 +388,7 @@ local on_digiline_receive_string = function(pos, node, channel, msg)
end
else
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)})
meta:set_string("last_msg", tostring(msg))
meta:set_int("index", 1)
@ -432,7 +437,7 @@ for i = 31, 255 do
inventory_image = wimage,
wield_image = wimage,
palette="led_marquee_palette.png",
use_texture_alpha = true,
use_texture_alpha = "blend",
groups = groups,
paramtype = "light",
paramtype2 = "colorwallmounted",