feat: announce going off route
This commit is contained in:
@ -179,10 +179,16 @@ async function tickRoute() {
|
||||
// Check if the user is on the route
|
||||
if (!isOnShape(loc, polyline)) {
|
||||
console.log("Off route!");
|
||||
if (!info.isOffRoute) {
|
||||
say("You went off route.");
|
||||
}
|
||||
info.isOffRoute = true;
|
||||
// TODO: Implement re-routing logic
|
||||
return;
|
||||
} else {
|
||||
if (info.isOffRoute) {
|
||||
say("You are back on route.");
|
||||
}
|
||||
info.isOffRoute = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user