From 663eb771c38f4e5abec0c557282c46332acd836f Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 25 Aug 2024 16:05:42 +0000 Subject: [PATCH 1/3] Create beta version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 652d8e6..fe12fd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@influenceth/sdk", - "version": "2.3.0", + "version": "2.3.0-beta.1", "description": "Influence SDK", "type": "module", "module": "./build/index.js", From d6afa8060e6c86273c096aeafff73cd46651d8f3 Mon Sep 17 00:00:00 2001 From: Elerium-115 Date: Fri, 16 Aug 2024 20:46:38 +0300 Subject: [PATCH 2/3] Add empty outputs for Tank Farm Construction, for production JSON --- src/lib/process.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/process.js b/src/lib/process.js index 5cd0004..c99bc22 100644 --- a/src/lib/process.js +++ b/src/lib/process.js @@ -4088,7 +4088,8 @@ const TYPES = { [Product.IDS.STEEL_SHEET]: 50000, [Product.IDS.STAINLESS_STEEL_SHEET]: 200000, [Product.IDS.FLUIDS_AUTOMATION_MODULE]: 2 - } + }, + outputs: {} } }; From 0f0c8830707e7edc35628ef377ee69f07bd4fe9d Mon Sep 17 00:00:00 2001 From: Elerium-115 Date: Sun, 25 Aug 2024 19:02:19 +0300 Subject: [PATCH 3/3] Update README.md with install and usage examples --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index b5a60d8..3bcf406 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,28 @@ Dispatcher.call('run_system', Dispatcher.callData.compile('run_system', { ABI types / schemas for all components can be found in `./contracts/starknet_components.json`. +## Install + +```sh +npm install @influenceth/sdk +``` + +## Usage + +```js +import * as InfluenceSDK from '@influenceth/sdk'; + +// Access game assets data and logic +const resourcesClassification = InfluenceSDK.Product.CLASSIFICATIONS.RAW_MATERIAL; +const allResourcesIds = InfluenceSDK.Product.getListByClassification(resourcesClassification); + +const resourcesBySpectralId = {}; +const spectralTypesData = InfluenceSDK.Asteroid.SPECTRAL_TYPES; +for (const [spectralId, spectralData] of Object.entries(spectralTypesData)) { + resourcesBySpectralId[spectralId] = spectralData.resources; +} +``` + ## API 1. The API is whitelist only, please request access to the #community-devs channel in the Influence Discord: https://discord.gg/influenceth to receive an API key. 2. If possible, prefer using the exports here: https://www.dropbox.com/sh/5g3ww8wi9n0p4s6/AADcR0lgL8iKTQrpiWUC37Oxa?dl=0 rather than adding additional load to the API.