From 3981f7214909cc4939d5bf226b7ed092612ab648 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Wed, 5 Jul 2023 19:50:29 -0400 Subject: [PATCH] Add investment info to API representation of product (#661) --- markdown/bitburner.product.advertisinginvestment.md | 13 +++++++++++++ markdown/bitburner.product.designinvestment.md | 13 +++++++++++++ markdown/bitburner.product.md | 2 ++ src/NetscriptFunctions/Corporation.ts | 2 ++ src/ScriptEditor/NetscriptDefinitions.d.ts | 4 ++++ 5 files changed, 34 insertions(+) create mode 100644 markdown/bitburner.product.advertisinginvestment.md create mode 100644 markdown/bitburner.product.designinvestment.md diff --git a/markdown/bitburner.product.advertisinginvestment.md b/markdown/bitburner.product.advertisinginvestment.md new file mode 100644 index 000000000..bcb11938e --- /dev/null +++ b/markdown/bitburner.product.advertisinginvestment.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Product](./bitburner.product.md) > [advertisingInvestment](./bitburner.product.advertisinginvestment.md) + +## Product.advertisingInvestment property + +Funds that were spent on advertising the product + +**Signature:** + +```typescript +advertisingInvestment: number; +``` diff --git a/markdown/bitburner.product.designinvestment.md b/markdown/bitburner.product.designinvestment.md new file mode 100644 index 000000000..d6367ae82 --- /dev/null +++ b/markdown/bitburner.product.designinvestment.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Product](./bitburner.product.md) > [designInvestment](./bitburner.product.designinvestment.md) + +## Product.designInvestment property + +Funds that were spent on designing the product + +**Signature:** + +```typescript +designInvestment: number; +``` diff --git a/markdown/bitburner.product.md b/markdown/bitburner.product.md index ec619687a..58b45ca2b 100644 --- a/markdown/bitburner.product.md +++ b/markdown/bitburner.product.md @@ -17,8 +17,10 @@ interface Product | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [actualSellAmount](./bitburner.product.actualsellamount.md) | | number | Amount of product sold last cycle | +| [advertisingInvestment](./bitburner.product.advertisinginvestment.md) | | number | Funds that were spent on advertising the product | | [competition](./bitburner.product.competition.md) | | number \| undefined | Competition for the product, only present if "Market Research - Competition" unlocked | | [demand](./bitburner.product.demand.md) | | number \| undefined | Demand for the product, only present if "Market Research - Demand" unlocked | +| [designInvestment](./bitburner.product.designinvestment.md) | | number | Funds that were spent on designing the product | | [desiredSellAmount](./bitburner.product.desiredsellamount.md) | | string \| number | Desired sell amount, e.g. "PROD/2" | | [desiredSellPrice](./bitburner.product.desiredsellprice.md) | | string \| number | Desired sell price, can be "MP+5" | | [developmentProgress](./bitburner.product.developmentprogress.md) | | number | A number between 0-100 representing percentage completion | diff --git a/src/NetscriptFunctions/Corporation.ts b/src/NetscriptFunctions/Corporation.ts index 85b190e7a..5a827f353 100644 --- a/src/NetscriptFunctions/Corporation.ts +++ b/src/NetscriptFunctions/Corporation.ts @@ -340,6 +340,8 @@ export function NetscriptCorporation(): InternalAPI { productionAmount: cityData.productionAmount, actualSellAmount: cityData.actualSellAmount, developmentProgress: product.developmentProgress, + advertisingInvestment: product.advertisingInvestment, + designInvestment: product.designInvestment, }; }, purchaseWarehouse: (ctx) => (_divisionName, _cityName) => { diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 5ec068317..e4006ab5f 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -7564,6 +7564,10 @@ interface Product { actualSellAmount: number; /** A number between 0-100 representing percentage completion */ developmentProgress: number; + /** Funds that were spent on advertising the product */ + advertisingInvestment: number; + /** Funds that were spent on designing the product */ + designInvestment: number; } /**