Mine shafts
This commit is contained in:
parent
c254339760
commit
500a0a7b9f
1 changed files with 15 additions and 1 deletions
|
@ -226,8 +226,22 @@ end
|
|||
|
||||
-- Mine a new shaft in front of the turtle
|
||||
function mine_shaft()
|
||||
turn_abs(0)
|
||||
while depth < SHAFT_DEPTH do
|
||||
if turtle.detect() then
|
||||
turtle.dig()
|
||||
end
|
||||
move_forward()
|
||||
end
|
||||
turn_abs(2)
|
||||
while depth > 0 do
|
||||
if turtle.detect() then
|
||||
turtle.dig()
|
||||
end
|
||||
move_forward()
|
||||
end
|
||||
turn_abs(0)
|
||||
end
|
||||
|
||||
-- Main function
|
||||
function main()
|
||||
|
|
Loading…
Reference in a new issue