Make generators stop supplying EUs when there is a non-fuel item in the fuel slot
authorThatGraemeGuy <thatgraemeguy@users.noreply.github.com>
Tue, 16 Sep 2014 19:03:35 +0000 (21:03 +0200)
committerShadowNinja <shadowninja@minetest.net>
Tue, 16 Sep 2014 19:21:14 +0000 (15:21 -0400)
technic/machines/register/generator.lua

index 64f75be6aa6b45f2d9f09655e2edec537dfa2bb0..c065de9128fae43daa2f78824138a5137094dbb4 100644 (file)
@@ -59,6 +59,7 @@ function technic.register_generator(data)
                                if not fuel or fuel.time == 0 then
                                        meta:set_string("infotext", S("%s Out Of Fuel"):format(desc))
                                        technic.swap_node(pos, "technic:"..ltier.."_generator")
+                                       meta:set_int(tier.."_EU_supply", 0)
                                        return
                                end
                                meta:set_int("burn_time", fuel.time)