Attempt at fixing heading.

This commit is contained in:
Harrison Deng 2021-05-09 13:19:42 -05:00
parent 231781eb89
commit 4cba73e9d0

View File

@ -436,13 +436,7 @@ local function quarry(x, y, z, relative, pattern)
z = tonumber(z)
local forward;
local right;
if relative then
forward = relHeading
right = relRightAxis
else
forward = heading
right = rightAxis
end
sendLog(QUARRY, "Starting quarry of (x length,depth,z length): " .. x .. "," .. y .. "," .. z .. " with a not pattern of: " .. pattern)
for yDelta=1,math.abs(y) do
if (y > 0) then
@ -475,6 +469,13 @@ local function quarry(x, y, z, relative, pattern)
else
orient(vector.new(0, 0, z), forward, right)
end
if relative then
forward = relHeading
right = relRightAxis
else
forward = heading
right = rightAxis
end
success = success and attemptBreakUp(pattern)
success = success and attemptBreakDown(pattern)
success = success and attemptBreakFront(pattern)
@ -492,6 +493,13 @@ local function quarry(x, y, z, relative, pattern)
sendLog(FAILED, "Unable to move to next row.")
return
end
if relative then
forward = relHeading
right = relRightAxis
else
forward = heading
right = rightAxis
end
end
end
end