Compare commits

...

1 commit

Author SHA1 Message Date
Théophile Bastian e806819475 Mine turtle: fix refuel 2020-08-18 18:35:05 +02:00

View file

@ -116,7 +116,7 @@ function refuel_turtle()
return false
end
go_to(DROP_POINT_H, DROP_POINT_D, DROP_POINT_S)
go_to(FUEL_POINT_H, FUEL_POINT_D, FUEL_POINT_S)
while turtle.getFuelLevel() < FUEL_EXPECTATION do
local rc, desc = turtle.suckUp()
if not rc then
@ -195,8 +195,8 @@ end
function main()
if turtle.getFuelLevel() < FUEL_LOW then
refuel_turtle()
else
print("NO FUEL AT ALL.")
elseif turtle.getFuelLevel() < distance_to_refuel() then
print("Not enough fuel to begin with.")
return
end