From bd3cc74d0576250af06a367369b7ea709d5581f4 Mon Sep 17 00:00:00 2001 From: ShadowNinja <noreply@gmail.com> Date: Tue, 24 Sep 2013 23:09:20 +0200 Subject: [PATCH] Don't consume items or drain power when there isn't room for the results --- technic/machines/register/electric_furnace.lua | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/technic/machines/register/electric_furnace.lua b/technic/machines/register/electric_furnace.lua index 2a7642f..7d57a59 100644 --- a/technic/machines/register/electric_furnace.lua +++ b/technic/machines/register/electric_furnace.lua @@ -152,12 +152,6 @@ local machine_node = "technic:"..string.lower(data.tier).."_electric_furnace" local machine_demand = data.demand - -- Setup meta data if it does not exist. state is used as an indicator of this - if not eu_input then - meta:set_int(data.tier.."_EU_demand", machine_demand[1]) - meta:set_int(data.tier.."_EU_input", 0) - end - -- Power off automatically if no longer connected to a switching station technic.switching_station_timeout_count(pos, data.tier) @@ -174,7 +168,8 @@ method = "cooking", width = 1, items = inv:get_list("src")}) - if not result or result.time == 0 then + if not result or result.time == 0 or + not inv:room_for_item("dst", result.item) then meta:set_int(data.tier.."_EU_demand", 0) hacky_swap_node(pos, machine_node) meta:set_string("infotext", machine_name.." Idle") -- Gitblit v1.8.0