summaryrefslogtreecommitdiff
path: root/technic/machines
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-11-03 23:05:36 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-11-03 23:05:36 -0400
commitfadb973205f3ad378db409c32f0ecd93b7df73ee (patch)
tree1651f4c30d7ee91f7ce6c34f4ac8ae92923449e4 /technic/machines
parent159a50b8ce13fccf03b5992f22bb994395f19780 (diff)
downloaddreambuilder_modpack-fadb973205f3ad378db409c32f0ecd93b7df73ee.tar
dreambuilder_modpack-fadb973205f3ad378db409c32f0ecd93b7df73ee.tar.gz
dreambuilder_modpack-fadb973205f3ad378db409c32f0ecd93b7df73ee.tar.bz2
dreambuilder_modpack-fadb973205f3ad378db409c32f0ecd93b7df73ee.tar.xz
dreambuilder_modpack-fadb973205f3ad378db409c32f0ecd93b7df73ee.zip
update boost_cart, currency, mesecons, pipeworks, and technic
Diffstat (limited to 'technic/machines')
-rw-r--r--technic/machines/supply_converter.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua
index aa41791..8527bcf 100644
--- a/technic/machines/supply_converter.lua
+++ b/technic/machines/supply_converter.lua
@@ -72,6 +72,9 @@ local digiline_def = {
receptor = {action = function() end},
effector = {
action = function(pos, node, channel, msg)
+ if type(msg) ~= "string" then
+ return
+ end
local meta = minetest.get_meta(pos)
if channel ~= meta:get_string("channel") then
return
@@ -90,7 +93,7 @@ local digiline_def = {
meta:set_int("enabled", 1)
elseif msg == "toggle" then
local onn = meta:get_int("enabled")
- onn = -(onn-1) -- Mirror onn with pivot 0.5, so switch between 1 and 0.
+ onn = 1-onn -- Mirror onn with pivot 0.5, so switch between 1 and 0.
meta:set_int("enabled", onn)
elseif msg:sub(1, 5) == "power" then
local power = tonumber(msg:sub(7))
@@ -103,6 +106,8 @@ local digiline_def = {
meta:set_int("power", power)
elseif msg:sub(1, 12) == "mesecon_mode" then
meta:set_int("mesecon_mode", tonumber(msg:sub(14)))
+ else
+ return
end
set_supply_converter_formspec(meta)
end