diff --git a/turtles/mine.lua b/turtles/mine.lua index bc01679..8191a14 100644 --- a/turtles/mine.lua +++ b/turtles/mine.lua @@ -226,7 +226,21 @@ end -- Mine a new shaft in front of the turtle function mine_shaft() - turtle.dig() + 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