Fix supply converter again
authorNovatux <nathanael.courant@laposte.net>
Mon, 14 Jul 2014 09:16:37 +0000 (11:16 +0200)
committerNovatux <nathanael.courant@laposte.net>
Mon, 14 Jul 2014 09:16:37 +0000 (11:16 +0200)
technic/machines/supply_converter.lua

index ccfb9b0b52d6f1fa3fd0c62454f135816cd26f7b..d89c3c1f9dc179e3dfda20723b4394ecaeb006d4 100644 (file)
@@ -35,7 +35,12 @@ local run = function(pos, node)
                        ..input * remain.." "..to..")")
        else
                meta:set_string("infotext", S("%s Has Bad Cabling"):format(machine_name))
-               meta:set_int(to.."_EU_supply", 0)
+               if to then
+                       meta:set_int(to.."_EU_supply", 0)
+               end
+               if from then
+                       meta:set_int(from.."_EU_demand", 0)
+               end
                return
        end