summaryrefslogtreecommitdiff
path: root/nixie_tubes
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-12-01 04:22:40 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-12-01 04:22:40 -0500
commit2922421f4a88e56a0a1c819f62bf2bc287835388 (patch)
treeb6dafb3d00ef05778e456716c03544279c2978fa /nixie_tubes
parent67d414d2f9aa5999e3f1755543a68455b4bb6d99 (diff)
downloaddreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar
dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.gz
dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.bz2
dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.xz
dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.zip
Update several mods:
biome_lib, boost_cart, building_blocks, castle, homedecor, glooptest, currency, roads, invsaw, maptools, mesecons, moreblocks, nixie_tubes, pipeworks, signs_lib, technic, unified_inventory, unifiedbricks, worldedit, xban2
Diffstat (limited to 'nixie_tubes')
-rw-r--r--nixie_tubes/init.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixie_tubes/init.lua b/nixie_tubes/init.lua
index 97bbd68..81bfe8f 100644
--- a/nixie_tubes/init.lua
+++ b/nixie_tubes/init.lua
@@ -312,7 +312,7 @@ local on_digiline_receive_alnum = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
local setchan = meta:get_string("channel")
if setchan ~= channel then return end
- if msg and msg ~= "" then
+ if msg and msg ~= "" and type(msg) == "string" then
local asc = string.byte(msg)
if msg == "off" then
minetest.swap_node(pos, { name = "nixie_tubes:alnum_32", param2 = node.param2})
@@ -328,6 +328,16 @@ local on_digiline_receive_alnum = function(pos, node, channel, msg)
minetest.swap_node(pos, { name = "nixie_tubes:alnum_129", param2 = node.param2})
elseif asc > 31 and alnum_chars[asc - 31] then
minetest.swap_node(pos, { name = "nixie_tubes:alnum_"..asc, param2 = node.param2})
+ elseif msg == "get" then -- get value as ASCII numerical value
+ digiline:receptor_send(pos, digiline.rules.default, channel, tonumber(string.match(minetest.get_node(pos).name,"nixie_tubes:alnum_(.+)"))) -- wonderfully horrible string manipulaiton
+ elseif msg == "getstr" then -- get actual char
+ digiline:receptor_send(pos, digiline.rules.default, channel, string.char(tonumber(string.match(minetest.get_node(pos).name,"nixie_tubes:alnum_(.+)"))))
+ end
+ elseif msg and type(msg) == "number" then
+ if msg == 0 then
+ minetest.swap_node(pos, { name = "nixie_tubes:alnum_32", param2 = node.param2})
+ elseif msg > 31 and alnum_chars[msg - 31] ~= nil then
+ minetest.swap_node(pos, { name = "nixie_tubes:alnum_"..tostring(msg), param2 = node.param2})
end
end
end