diff options
author | kpoppel <poulsen.kim@gmail.com> | 2013-07-06 00:31:48 +0200 |
---|---|---|
committer | kpoppel <poulsen.kim@gmail.com> | 2013-07-06 00:31:48 +0200 |
commit | 85d937e1997bcaa833e40df78117d53708ecdccd (patch) | |
tree | 08d774954e392fa4e60a25c7011a4556ecea9236 | |
parent | 4c6546ed56da9b8ac7db490af841d11ef9a10368 (diff) |
Made the supply converter reset its supply and demand stats if the cabling is bad.
-rw-r--r-- | technic/supply_converter.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/technic/supply_converter.lua b/technic/supply_converter.lua index d0714e7..bee99d2 100644 --- a/technic/supply_converter.lua +++ b/technic/supply_converter.lua @@ -97,6 +97,15 @@ minetest.register_abm( if convert_MV_LV == 0 and convert_LV_MV == 0 and convert_HV_MV == 0 and convert_MV_HV == 0 then meta:set_string("infotext", machine_name.." has bad cabling") + meta:set_int("LV_EU_demand", 0) + meta:set_int("LV_EU_supply", 0) + meta:set_int("LV_EU_input", 0) + meta:set_int("MV_EU_demand", 0) + meta:set_int("MV_EU_supply", 0) + meta:set_int("MV_EU_input", 0) + meta:set_int("HV_EU_demand", 0) + meta:set_int("HV_EU_supply", 0) + meta:set_int("HV_EU_input", 0) return end |