fixed a condition with mv machines so as to not power down machines with stuff to...
authorhdastwb <hdastwb@hdastwb.heliohost.org>
Wed, 24 Jul 2013 01:43:36 +0000 (21:43 -0400)
committerhdastwb <hdastwb@hdastwb.heliohost.org>
Wed, 24 Jul 2013 01:43:36 +0000 (21:43 -0400)
technic/machines/mv/alloy_furnace.lua
technic/machines/mv/electric_furnace.lua
technic/machines/mv/grinder.lua

index b7a837fa77feb14ac8a010667b9171d692dc9f14..180926262768c3b1e16508b16032a7d25cfbdf0b 100644 (file)
@@ -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
                   ----------------------
index a125d4b3470a8b83dff6888a02173cb121480d36..c6a1651cec6f147153b0da2c620dc6aba57c3051 100644 (file)
@@ -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
                ----------------------
index e99379410ce5d2b9e55daeba2986722a53c8b7af..84710c94c4d635e74ea6cb5676542850c9d06a8a 100644 (file)
@@ -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