From d77558b8def94fd1e1efecc3cfebb7dd3b6d6ae3 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 21 May 2024 00:26:17 +0200 Subject: [node] implement agent automation that visits all shipyards with the starting probe --- nodejs/lib/systems.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nodejs/lib/systems.ts') diff --git a/nodejs/lib/systems.ts b/nodejs/lib/systems.ts index 6f0a830..f07f92b 100644 --- a/nodejs/lib/systems.ts +++ b/nodejs/lib/systems.ts @@ -13,13 +13,13 @@ import { Waypoint, } from './types.ts' import { - isThereAShipAtThisWaypoint, + is_there_a_ship_at_this_waypoint, systemFromWaypoint, } from './utils.ts'; export async function market(waypoint: Waypoint): Promise { const data = dbMarkets.getMarketAtWaypoint(waypoint.symbol); - if (data && (data.tradeGoods || !isThereAShipAtThisWaypoint(waypoint))) { return data; } + if (data && (data.tradeGoods || !is_there_a_ship_at_this_waypoint(waypoint))) { return data; } const systemSymbol = systemFromWaypoint(waypoint.symbol); let response = await send({endpoint: `/systems/${systemSymbol}/waypoints/${waypoint.symbol}/market`}); if (response.error) { @@ -32,7 +32,7 @@ export async function market(waypoint: Waypoint): Promise { export async function shipyard(waypoint: Waypoint): Promise { const data = dbShipyards.get(waypoint.symbol); - if (data && (data.ships || !isThereAShipAtThisWaypoint(waypoint))) { return data; } + if (data && (data.ships || !is_there_a_ship_at_this_waypoint(waypoint))) { return data; } const systemSymbol = systemFromWaypoint(waypoint.symbol); const response = await send({endpoint: `/systems/${systemSymbol}/waypoints/${waypoint.symbol}/shipyard`}); if (response.error) { -- cgit v1.2.3