[javascript] Rework the contracting loop following the asteroids changes
This commit is contained in:
parent
4c4e4cb98f
commit
01e3f05ea0
5 changed files with 30 additions and 20 deletions
|
@ -5,7 +5,7 @@ import * as systems from '../lib/systems.js';
|
|||
|
||||
export async function extract(ctx) {
|
||||
const ship = dbShips.getShip(ctx.symbol);
|
||||
const asteroidFields = await systems.type({symbol: ship.nav.systemSymbol, type: 'ASTEROID_FIELD'});
|
||||
const asteroidFields = await systems.type({symbol: ship.nav.systemSymbol, type: 'ENGINEERED_ASTEROID'});
|
||||
// TODO if there are multiple fields, find the closest one?
|
||||
await navigate({symbol: ctx.symbol, waypoint: asteroidFields[0].symbol});
|
||||
await orbit(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue