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
|
||||
return
|
||||
elseif vectorEqual(v, right) then
|
||||
attemptMoveRight()
|
||||
return attemptMoveRight()
|
||||
elseif vectorEqual(v, -right) then
|
||||
attemptMoveLeft()
|
||||
return attemptMoveLeft()
|
||||
else
|
||||
attemptMoveRight()
|
||||
attemptMoveRight()
|
||||
return attemptMoveRight() and attemptMoveRight()
|
||||
end
|
||||
print("Orientation complete.")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user