diff --git a/elepower_machines/machines/bases/fluid_generator.lua b/elepower_machines/machines/bases/fluid_generator.lua index c73af2a..3f63e75 100644 --- a/elepower_machines/machines/bases/fluid_generator.lua +++ b/elepower_machines/machines/bases/fluid_generator.lua @@ -84,7 +84,7 @@ function ele.register_fluid_generator(nodename, nodedef) status = "Active" - -- Burn another bucket of lava + -- Burn another bucket of fluid fuel if burn_time == 0 then if not flbuffer or flbuffer.fluid == "" then break end @@ -93,7 +93,7 @@ function ele.register_fluid_generator(nodename, nodedef) meta:set_int("burn_time", btime) meta:set_int("burn_totaltime", btime) - -- Take lava + -- Take fluid fuel flbuffer.amount = flbuffer.amount - busage pow_buffer.usage = generation @@ -110,6 +110,8 @@ function ele.register_fluid_generator(nodename, nodedef) else status = "Idle" ele.helpers.swap_node(pos, nodename) + + refresh = false end end if burn_totaltime == 0 then burn_totaltime = 1 end diff --git a/elepower_machines/machines/bases/generator.lua b/elepower_machines/machines/bases/generator.lua index c344fce..1f7e0c2 100644 --- a/elepower_machines/machines/bases/generator.lua +++ b/elepower_machines/machines/bases/generator.lua @@ -60,7 +60,7 @@ function elepm.register_fuel_generator(nodename, nodedef) -- If more to burn and the energy produced was used: produce some more if burn_time > 0 then if storage + generation > capacity then - return false + break end pow_buffer.storage = pow_buffer.storage + generation @@ -68,6 +68,8 @@ function elepm.register_fuel_generator(nodename, nodedef) burn_time = burn_time - 1 meta:set_int("burn_time", burn_time) + + refresh = true end status = "Active" @@ -102,6 +104,8 @@ function elepm.register_fuel_generator(nodename, nodedef) else status = "Idle" ele.helpers.swap_node(pos, nodename) + + refresh = false end end if burn_totaltime == 0 then burn_totaltime = 1 end