begin moving turtle specific code from opus into turtle package

This commit is contained in:
kepler155c@gmail.com
2019-02-18 02:57:01 -05:00
parent 20bb3d831f
commit 3564dff4fd
21 changed files with 331 additions and 134 deletions

View File

@@ -139,7 +139,7 @@ local function harvest(blocks)
turtle.digForwardAt(b)
elseif b.action == 'drop' and not dropped then
if turtle._goto(Point.above(b)) then
if turtle.go(Point.above(b)) then
turtle.eachFilledSlot(function(slot)
if not retain[slot.name] and not retain[slot.key] then
turtle.select(slot.index)
@@ -212,7 +212,7 @@ local function harvest(blocks)
local hi = Point.headings[(h + 2) % 4] -- opposite heading
-- without pathfinding, will be unable to circle log
if turtle._goto({ x = b.x + hi.xd, z = b.z + hi.zd, heading = h }) then
if turtle.go({ x = b.x + hi.xd, z = b.z + hi.zd, heading = h }) then
if turtle.dig() then
turtle.place(crops[b.name].seed)
end