summaryrefslogtreecommitdiff
path: root/technic/machines
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-17 16:53:18 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-03-17 16:53:18 -0400
commit907e8bf6a64215a516fdf16869dd81248aeaa2f6 (patch)
treed199282e5764c7ab5183fe0d78ed0412dbb0b89f /technic/machines
parent06d9243586cecb1abed74550ce2544b436572a35 (diff)
downloaddreambuilder_modpack-907e8bf6a64215a516fdf16869dd81248aeaa2f6.tar
dreambuilder_modpack-907e8bf6a64215a516fdf16869dd81248aeaa2f6.tar.gz
dreambuilder_modpack-907e8bf6a64215a516fdf16869dd81248aeaa2f6.tar.bz2
dreambuilder_modpack-907e8bf6a64215a516fdf16869dd81248aeaa2f6.tar.xz
dreambuilder_modpack-907e8bf6a64215a516fdf16869dd81248aeaa2f6.zip
update digilines, technic, unified inventory,
and switched castles to the new modpack form
Diffstat (limited to 'technic/machines')
-rw-r--r--technic/machines/supply_converter.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua
index 0d32439..af10baa 100644
--- a/technic/machines/supply_converter.lua
+++ b/technic/machines/supply_converter.lua
@@ -68,7 +68,15 @@ local run = function(pos, node, run_stage)
-- Machine information
local machine_name = S("Supply Converter")
local meta = minetest.get_meta(pos)
- local enabled = meta:get_string("enabled") ~= "0" and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
+ local enabled = meta:get_string("enabled")
+ if enabled == "" then
+ -- Backwards compatibility
+ minetest.registered_nodes["technic:supply_converter"].on_construct(pos)
+ enabled = true
+ else
+ enabled = enabled == "1"
+ end
+ enabled = enabled and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
local demand = enabled and meta:get_int("power") or 0
local pos_up = {x=pos.x, y=pos.y+1, z=pos.z}