From 7008c91c6fb74f7106c4d9903849d3f1fc17b2f1 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 2 Jun 2023 00:00:09 +0200 Subject: Improved ships lib with ships db caching --- automation/mining.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'automation/mining.js') diff --git a/automation/mining.js b/automation/mining.js index a719bff..113425b 100644 --- a/automation/mining.js +++ b/automation/mining.js @@ -6,7 +6,7 @@ import * as ships from '../lib/ships.js'; export async function mineUntilFullOf(ctx) { while(true) { let response = await mineUntilFull({ship: ctx.ship}); - if (response === null) response = await ships.ship({ship: ctx.ship}); // TODO we should not need to fetch this + if (response === null) response = await ships.ship({symbol: ctx.ship}); // TODO we should not need to fetch this let good = response.data.cargo.inventory.filter(i => i.symbol === ctx.good)[0]; const inventory = response.data.cargo.inventory.filter(i => i.symbol !== ctx.good); const antimatter = response.data.cargo.inventory.filter(i => i.symbol === 'ANTIMATTER')[0]; @@ -17,7 +17,7 @@ export async function mineUntilFullOf(ctx) { for (let i=0; i= response.data.cargo.capacity * 0.9) return response; -- cgit v1.2.3