From ccbfd9deb947c776782b80229be4513485321a88 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 17 May 2024 22:01:29 +0200 Subject: [node] fixed and optimized contracting --- nodejs/automation/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nodejs/automation/init.ts') diff --git a/nodejs/automation/init.ts b/nodejs/automation/init.ts index 7ec1252..1fa9949 100644 --- a/nodejs/automation/init.ts +++ b/nodejs/automation/init.ts @@ -5,7 +5,7 @@ import { } from '../lib/api.ts'; import { Agent, initAgent, setAgent } from '../lib/agent.ts'; import { Contract } from '../lib/contracts.ts'; -import { Ship } from '../lib/ships.ts'; +import { initShips, Ship } from '../lib/ships.ts'; import * as libContracts from '../lib/contracts.ts'; const symbol = process.env.NODE_ENV === 'test' ? 'ADYXAX-0' : 'ADYXAX-JS'; @@ -28,6 +28,7 @@ export async function init(): Promise { case 4111: // 4111 means the agent symbol has already been claimed so no server reset happened // TODO await agents.agents(); await initAgent(); + await initShips(); return; default: throw json; @@ -36,4 +37,5 @@ export async function init(): Promise { db.reset(); dbTokens.addToken(json.data.token); setAgent(json.data.agent); + await initShips(); } -- cgit v1.2.3