1
0
Fork 0

Update ships status at the end of the nav cooldown

This commit is contained in:
Julien Dessaux 2023-06-06 23:45:25 +02:00
parent 1853bd1268
commit 458d08626f
Signed by: adyxax
GPG key ID: F92E51B86E07177E
2 changed files with 8 additions and 0 deletions

View file

@ -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;
}