Fixed issue with nil fuels.
This commit is contained in:
parent
d3f64ed191
commit
1c95cad34a
|
@ -115,11 +115,13 @@ local function refuelAll(settings)
|
||||||
local refueled = false
|
local refueled = false
|
||||||
for slot = 1, 16 do
|
for slot = 1, 16 do
|
||||||
local item = t.getItemDetail(slot)
|
local item = t.getItemDetail(slot)
|
||||||
for _, fuelName in pairs(fuels) do
|
if item ~= nil then
|
||||||
if item.name == fuelName then
|
for _, fuelName in pairs(fuels) do
|
||||||
t.select(i)
|
if item.name == fuelName then
|
||||||
if t.refuel(item.count) then refueled = true end
|
t.select(i)
|
||||||
break
|
if t.refuel(item.count) then refueled = true end
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue