mirror of
https://github.com/mt-mods/nixie_tubes.git
synced 2024-12-04 21:23:47 +01:00
add missing char, fix char->ascii->table pos calculation
This commit is contained in:
parent
4d32583fef
commit
8813b6d50e
5
init.lua
5
init.lua
@ -135,6 +135,7 @@ local alnum_chars = {
|
||||
{ "(", { 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0 } },
|
||||
{ ")", { 0,0,0,0,0,0,1,0,0,0,0,0,1,0,0 } },
|
||||
{ "*", { 0,0,0,0,0,0,1,1,1,0,1,1,1,0,0 } },
|
||||
{ "+", { 0,0,0,0,0,0,0,1,0,1,0,1,0,1,0 } },
|
||||
{ ",", { 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0 } },
|
||||
{ "-", { 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 } },
|
||||
{ ".", { 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 } },
|
||||
@ -228,7 +229,7 @@ local on_digiline_receive_alnum = function(pos, node, channel, msg)
|
||||
local setchan = meta:get_string("channel")
|
||||
if setchan ~= channel then return end
|
||||
if msg then
|
||||
local asc = string.byte(msg) or 32
|
||||
local asc = string.byte(msg)
|
||||
if msg == "off" then
|
||||
minetest.swap_node(pos, { name = "nixie_tubes:alnum_32", param2 = node.param2})
|
||||
elseif msg == "colon" then
|
||||
@ -241,7 +242,7 @@ local on_digiline_receive_alnum = function(pos, node, channel, msg)
|
||||
minetest.swap_node(pos, { name = "nixie_tubes:alnum_128", param2 = node.param2})
|
||||
elseif msg == "cursor" then
|
||||
minetest.swap_node(pos, { name = "nixie_tubes:alnum_129", param2 = node.param2})
|
||||
elseif asc and alnum_chars[asc] then
|
||||
elseif asc > 31 and alnum_chars[asc - 31] then
|
||||
minetest.swap_node(pos, { name = "nixie_tubes:alnum_"..asc, param2 = node.param2})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user