Added return success bool for orienting.
This commit is contained in:
parent
48af2c55cf
commit
5a05ede075
@ -252,12 +252,11 @@ local function orient(v, forward, right)
|
|||||||
if vectorEqual(v, forward) then
|
if vectorEqual(v, forward) then
|
||||||
return
|
return
|
||||||
elseif vectorEqual(v, right) then
|
elseif vectorEqual(v, right) then
|
||||||
attemptMoveRight()
|
return attemptMoveRight()
|
||||||
elseif vectorEqual(v, -right) then
|
elseif vectorEqual(v, -right) then
|
||||||
attemptMoveLeft()
|
return attemptMoveLeft()
|
||||||
else
|
else
|
||||||
attemptMoveRight()
|
return attemptMoveRight() and attemptMoveRight()
|
||||||
attemptMoveRight()
|
|
||||||
end
|
end
|
||||||
print("Orientation complete.")
|
print("Orientation complete.")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user