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