Fixed issue with nil fuels.
This commit is contained in:
parent
d3f64ed191
commit
1c95cad34a
|
@ -115,6 +115,7 @@ 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)
|
||||||
|
if item ~= nil then
|
||||||
for _, fuelName in pairs(fuels) do
|
for _, fuelName in pairs(fuels) do
|
||||||
if item.name == fuelName then
|
if item.name == fuelName then
|
||||||
t.select(i)
|
t.select(i)
|
||||||
|
@ -123,6 +124,7 @@ local function refuelAll(settings)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return refueled
|
return refueled
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue