Skip to content

Commit

Permalink
Fix Grinder fool with fuel. Closes #1784
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Nov 13, 2024
1 parent 6b4e499 commit fe79ea2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mods/lord/Blocks/grinder/src/grinder/Processor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ local function burn_fuel(meta, remaining_fuel, result_fuel)
local fuel_time = meta:get_int("fuel_time")
local fuel_totaltime = meta:get_int("fuel_totaltime")

if fuel_time == 0 or fuel_totaltime == 0 then
if fuel_totaltime ~= result_fuel.time then
meta:set_int("fuel_totaltime", result_fuel.time)
end
if fuel_time == 0 then
meta:get_inventory():set_stack("fuel", 1, remaining_fuel)
end

fuel_time = fuel_time + 1

if fuel_time >= fuel_totaltime then
local inv = meta:get_inventory()
inv:set_stack("fuel", 1, remaining_fuel)
fuel_time = 0
end

Expand Down

0 comments on commit fe79ea2

Please sign in to comment.