Compare commits
1 commit
b8c2c344f0
...
e806819475
Author | SHA1 | Date | |
---|---|---|---|
Théophile Bastian | e806819475 |
|
@ -116,7 +116,7 @@ function refuel_turtle()
|
||||||
return false
|
return false
|
||||||
end
|
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
|
while turtle.getFuelLevel() < FUEL_EXPECTATION do
|
||||||
local rc, desc = turtle.suckUp()
|
local rc, desc = turtle.suckUp()
|
||||||
if not rc then
|
if not rc then
|
||||||
|
@ -195,8 +195,8 @@ end
|
||||||
function main()
|
function main()
|
||||||
if turtle.getFuelLevel() < FUEL_LOW then
|
if turtle.getFuelLevel() < FUEL_LOW then
|
||||||
refuel_turtle()
|
refuel_turtle()
|
||||||
else
|
elseif turtle.getFuelLevel() < distance_to_refuel() then
|
||||||
print("NO FUEL AT ALL.")
|
print("Not enough fuel to begin with.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue