Have thing cleanup

This commit is contained in:
Salt 2023-12-01 17:00:25 -06:00
parent 946d96a6af
commit a643feafd9

View File

@ -8,6 +8,7 @@ function placeBreeder()
-- Check to see if this iteration obtained a new chicken -- Check to see if this iteration obtained a new chicken
if turtle.suckUp() then if turtle.suckUp() then
-- Then, we destroy the breeder -- Then, we destroy the breeder
print('Placing breeder with new chicken')
turtle.select(2) turtle.select(2)
turtle.digUp() turtle.digUp()
-- We are now in a position where we have: -- We are now in a position where we have:
@ -21,6 +22,7 @@ function placeBreeder()
turtle.dropDown(1) turtle.dropDown(1)
else else
-- Just pop the breeder for consistency -- Just pop the breeder for consistency
print('Placing breeder from scratch')
turtle.select(2) turtle.select(2)
turtle.digUp() turtle.digUp()
end end
@ -92,6 +94,16 @@ function checkIfDone()
return false return false
end end
function cleanup()
print('Cleaning up...')
turtle.digUp()
for i = 1, 16, 1 do
turtle.select(i)
turtle.dropDown()
end
print('Cleanup complete')
end
local function main() local function main()
print('Initializing...') print('Initializing...')
while not checkIfDone() do while not checkIfDone() do