diff options
author | RealBadAngel <mk@realbadangel.pl> | 2013-07-24 03:39:09 -0700 |
---|---|---|
committer | RealBadAngel <mk@realbadangel.pl> | 2013-07-24 03:39:09 -0700 |
commit | f4d9a1e4e70185418d16328e5f733fed798c37c5 (patch) | |
tree | 63e794acae16bd66124664751ce9feae86f4d136 | |
parent | e38f6f0983feb5725feab8f966d2385b7c7ae23d (diff) | |
parent | 2d7f750d9a734e2c84cc1ee14746a4ee2f8757e6 (diff) |
Merge pull request #64 from hdastwb/mvidlecond
fix the mv tube-enabled idle condition
-rw-r--r-- | technic/machines/mv/alloy_furnace.lua | 3 | ||||
-rw-r--r-- | technic/machines/mv/electric_furnace.lua | 3 | ||||
-rw-r--r-- | technic/machines/mv/grinder.lua | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/technic/machines/mv/alloy_furnace.lua b/technic/machines/mv/alloy_furnace.lua index b7a837f..1809262 100644 --- a/technic/machines/mv/alloy_furnace.lua +++ b/technic/machines/mv/alloy_furnace.lua @@ -262,8 +262,7 @@ minetest.register_abm( -- The machine shuts down if we have nothing to smelt and no tube is connected -- or if we have nothing to send with a tube connected. - if (not output_tube_connected and inv:is_empty("src")) - or ( output_tube_connected and inv:is_empty("dst")) then + if inv:is_empty("src") and (not output_tube_connected or inv:is_empty("dst")) then next_state = 1 end ---------------------- diff --git a/technic/machines/mv/electric_furnace.lua b/technic/machines/mv/electric_furnace.lua index a125d4b..c6a1651 100644 --- a/technic/machines/mv/electric_furnace.lua +++ b/technic/machines/mv/electric_furnace.lua @@ -262,8 +262,7 @@ minetest.register_abm( -- The machine shuts down if we have nothing to smelt and no tube is connected -- or if we have nothing to send with a tube connected. - if (not output_tube_connected and inv:is_empty("src")) - or ( output_tube_connected and inv:is_empty("dst")) then + if inv:is_empty("src") and (not output_tube_connected or inv:is_empty("dst")) then next_state = 1 end ---------------------- diff --git a/technic/machines/mv/grinder.lua b/technic/machines/mv/grinder.lua index e993794..84710c9 100644 --- a/technic/machines/mv/grinder.lua +++ b/technic/machines/mv/grinder.lua @@ -239,8 +239,7 @@ minetest.register_abm( -- The machine shuts down if we have nothing to grind and no tube is connected -- or if we have nothing to send with a tube connected. - if (not output_tube_connected and inv:is_empty("src")) - or ( output_tube_connected and inv:is_empty("dst")) then + if inv:is_empty("src") and (not output_tube_connected or inv:is_empty("dst")) then next_state = 1 end |