diff --git a/turtles/mine.lua b/turtles/mine.lua index 9c0ba0b..39c3ebf 100644 --- a/turtles/mine.lua +++ b/turtles/mine.lua @@ -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 @@ -193,11 +193,11 @@ end -- Main function function main() - if turtle.getFuelLevel() < FUEL_LOW then - refuel_turtle() - else - print("NO FUEL AT ALL.") + if turtle.getFuelLevel() < distance_to_refuel() then + print("Not enough fuel to begin with.") return + elseif turtle.getFuelLevel() < FUEL_LOW then + refuel_turtle() end while true do