Update ships status at the end of the nav cooldown
This commit is contained in:
parent
1853bd1268
commit
458d08626f
2 changed files with 8 additions and 0 deletions
|
@ -61,6 +61,8 @@ export async function navigate(ctx) {
|
|||
dbShips.setShipNav(ctx.symbol, response.data.nav);
|
||||
const delay = new Date(response.data.nav.route.arrival) - new Date();
|
||||
await api.sleep(delay);
|
||||
response.data.nav.status = 'IN_ORBIT';
|
||||
dbShips.setShipNav(ctx.symbol, response.data.nav);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue