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. diff --git a/package.json b/package.json index 162d692..08494fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@influenceth/sdk", - "version": "2.3.1", + "version": "2.3.2", "description": "Influence SDK", "type": "module", "module": "./build/index.js", 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: {} } };