diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-03-26 22:34:17 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-03-26 22:34:17 -0400 |
commit | 821fba9b02d180c89c01f5fe28563bb2d434f3c2 (patch) | |
tree | f0eef9d600f9862848698713f8577b2db29142fd | |
parent | 187fd90a7cc8a91ed1b3dcfee7f5fdceda89ed7a (diff) |
Fix CNC power drain
-rw-r--r-- | technic/machines/LV/cnc.lua | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/technic/machines/LV/cnc.lua b/technic/machines/LV/cnc.lua index 10e9391..5d3bdb2 100644 --- a/technic/machines/LV/cnc.lua +++ b/technic/machines/LV/cnc.lua @@ -185,17 +185,9 @@ minetest.register_abm({ local machine_node = "technic:cnc" local demand = 450 - -- Setup meta data if it does not exist. state is used as an indicator of this - if not eu_input then - meta:set_int("LV_EU_demand", demand) - meta:set_int("LV_EU_input", 0) - return - end - -- Power off automatically if no longer connected to a switching station technic.switching_station_timeout_count(pos, "LV") - local result = meta:get_string("cnc_product") if inv:is_empty("src") or (not minetest.registered_nodes[result]) or @@ -203,6 +195,7 @@ minetest.register_abm({ technic.swap_node(pos, machine_node) meta:set_string("infotext", S("%s Idle"):format(machine_name)) meta:set_string("cnc_product", "") + meta:set_int("LV_EU_demand", 0) return end |