Compare commits

..

2 commits

View file

@ -24,6 +24,10 @@ FUEL_LOW = 1000
SHAFT_DEPTH = 100
-- Start at this position to find the next shaft
next_shaft_side = 0
next_shaft_height = 0
function distance_to_drop()
return math.abs(depth - DROP_POINT_D)
+ math.abs(height - DROP_POINT_H)
@ -178,7 +182,7 @@ function find_next_shaft()
return is_shaft_pos() and turtle.detect()
end
go_to(0, 0, 0)
go_to(next_shaft_height, 0, next_shaft_side)
while true do
for hei=1,MAX_HEIGHT-1 do
@ -242,6 +246,8 @@ function main()
while true do
print("Finding shaft")
find_next_shaft()
next_shaft_height = height
next_shaft_side = side
print("Mining shaft at position:")
_dump_pos()
mine_shaft()