diff options
Diffstat (limited to '')
-rw-r--r-- | nodejs/automation/contracting.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nodejs/automation/contracting.ts b/nodejs/automation/contracting.ts index 344672a..ab3c606 100644 --- a/nodejs/automation/contracting.ts +++ b/nodejs/automation/contracting.ts @@ -58,9 +58,11 @@ async function runProcurement(contract: Contract, ships: Array<Ship>) { await libShips.navigate(ship, asteroidSymbol); break; default: - // we were either selling or started contracting - await selling.sell(ship, wantedCargo); - await libShips.navigate(ship, asteroidSymbol); + if (libShips.isFull(ship)) { + await selling.sell(ship, wantedCargo); + } else { + await libShips.navigate(ship, asteroidSymbol); + } } } // TODO repurpose the ship |