api cleanup

This commit is contained in:
kepler155c
2017-11-15 00:09:29 -05:00
parent 2526308eb6
commit f6fb6a4433
12 changed files with 263 additions and 368 deletions

View File

@@ -1 +1,2 @@
turtle.run(turtle.gotoGPSHome)
local Home = require('turtle.home')
turtle.run(Home.go)

View File

@@ -67,7 +67,7 @@ local function findObsidian()
end
node = Point.closest(turtle.point, nodes)
if not turtle.gotoPoint(node) then
if not turtle._goto(node) then
break
end
until turtle.isAborted()
@@ -91,7 +91,7 @@ turtle.run(function()
if not turtle.select('minecraft:water_bucket') then
break
end
turtle._goto(0, 0)
turtle._goto({ x = 0, z = 0 })
turtle.placeDown()
os.sleep(2)
turtle.placeDown()
@@ -104,5 +104,5 @@ turtle.run(function()
error(m)
end
turtle._goto(0, 0, 0, 0)
turtle._goto({ x = 0, y = 0, z = 0, heading = 0 })
end)

View File

@@ -1 +1,2 @@
turtle.run(turtle.setGPSHome)
local Home = require('turtle.home')
turtle.run(Home.set)

View File

@@ -32,7 +32,7 @@ local function summon(id)
local function doGPS()
tFixes = { }
for i = 1, 4 do
if not turtle.gotoPoint(pts[i]) then
if not turtle._goto(pts[i]) then
error('turtle: Unable to perform GPS maneuver')
end
local distance = getDistance()