add more output
This commit is contained in:
parent
e390dd09be
commit
f524c9b54f
@ -6,6 +6,7 @@ local function compareItemName(target)
|
||||
if itemDetail == nil then
|
||||
return nil
|
||||
end
|
||||
print('item name: ' .. itemDetail.name)
|
||||
return itemDetail.name == target
|
||||
end
|
||||
|
||||
@ -19,8 +20,9 @@ end
|
||||
|
||||
local function findFirstEmptyBucket()
|
||||
for i=1,16 do
|
||||
print('Testing slot for empty bucket: ' .. i)
|
||||
if isEmptyBucket() then
|
||||
print('Slot' .. i .. 'is an empty bucket')
|
||||
print('Found an empty bucket in slot ' .. i)
|
||||
return i
|
||||
end
|
||||
end
|
||||
@ -30,8 +32,9 @@ end
|
||||
local function findFirstLavaBucket()
|
||||
for i=1,16 do
|
||||
turtle.select(i)
|
||||
print('Testing slot for lava bucket: ' .. i)
|
||||
if isLavaBucket() then
|
||||
print('Slot' .. i .. 'is an lava bucket')
|
||||
print('Found a lava bucket in slot ' .. i)
|
||||
return i
|
||||
end
|
||||
end
|
||||
@ -48,11 +51,12 @@ end
|
||||
local function refuel()
|
||||
local lava_bucket = findFirstLavaBucket()
|
||||
if lava_bucket == nil then
|
||||
return nil
|
||||
return false
|
||||
end
|
||||
|
||||
turtle.select(lava_bucket)
|
||||
turtle.refuel()
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@ -60,7 +64,7 @@ ForwardCounter = 0
|
||||
|
||||
while true do
|
||||
if turtle.getFuelLevel() < 1000 then
|
||||
if refuel() == nil then
|
||||
if not refuel() then
|
||||
print('refulling failed. probably the end of the lava lake. returning to base')
|
||||
returnToBase()
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user