Fixed issue with nil fuels.

This commit is contained in:
Andrew Lalis 2022-12-22 10:48:42 +01:00
parent d3f64ed191
commit 1c95cad34a
1 changed files with 7 additions and 5 deletions

View File

@ -115,6 +115,7 @@ local function refuelAll(settings)
local refueled = false
for slot = 1, 16 do
local item = t.getItemDetail(slot)
if item ~= nil then
for _, fuelName in pairs(fuels) do
if item.name == fuelName then
t.select(i)
@ -123,6 +124,7 @@ local function refuelAll(settings)
end
end
end
end
return refueled
end