fix(turtle-utils): refuelWithBuffer check if fuelSlot is nil
This commit is contained in:
parent
799d1654c2
commit
ea4f132f2e
@ -320,7 +320,11 @@ turtleUtils.refuelWithBuffer = function(sideFuel, sideBuffer, minFuelNeeded, sle
|
||||
|
||||
local ok, errMessage = turtleUtils.refuel(minFuelNeeded, function()
|
||||
local fuelSlot = findFuelSlot(fuelInventory)
|
||||
fuelInventory.pushItems(peripheral.getName(bufferInventory), fuelSlot)
|
||||
|
||||
if fuelSlot ~= nil then
|
||||
fuelInventory.pushItems(peripheral.getName(bufferInventory), fuelSlot)
|
||||
end
|
||||
|
||||
return suckFn()
|
||||
end, sleepTime)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user