From 821fba9b02d180c89c01f5fe28563bb2d434f3c2 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 26 Mar 2014 22:34:17 -0400 Subject: [PATCH] Fix CNC power drain --- technic/machines/LV/cnc.lua | 9 +-------- 1 file changed, 1 insertion(+), 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 -- 2.30.2