Fixed orient not returning true on possible movement.

This commit is contained in:
Harrison Deng 2021-05-05 18:58:11 -05:00
parent d720eaf468
commit 825bc0b523

View File

@ -250,7 +250,7 @@ end
local function orient(v, forward, right)
print("Attempting to orient such that " .. tostring(v) .. " == " .. tostring(forward) .. ".")
if vectorEqual(v, forward) then
return
return true
elseif vectorEqual(v, right) then
return attemptMoveRight()
elseif vectorEqual(v, -right) then
@ -258,7 +258,7 @@ local function orient(v, forward, right)
else
return attemptMoveRight() and attemptMoveRight()
end
print("Orientation complete.")
return false
end
local function attemptStartTask(name, f, ...)