From e8254923197a03cc22f3a542481642644c9f9c66 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Mon, 11 Nov 2024 07:32:25 +0700 Subject: [PATCH] CORPORATION: Expose valuation via ns.corporation.getCorporation() (#1765) --- markdown/bitburner.corporationinfo.md | 1 + markdown/bitburner.corporationinfo.valuation.md | 13 +++++++++++++ src/NetscriptFunctions/Corporation.ts | 1 + src/ScriptEditor/NetscriptDefinitions.d.ts | 2 ++ 4 files changed, 17 insertions(+) create mode 100644 markdown/bitburner.corporationinfo.valuation.md diff --git a/markdown/bitburner.corporationinfo.md b/markdown/bitburner.corporationinfo.md index 03a7fd16e..ce4948c59 100644 --- a/markdown/bitburner.corporationinfo.md +++ b/markdown/bitburner.corporationinfo.md @@ -34,4 +34,5 @@ interface CorporationInfo | [sharePrice](./bitburner.corporationinfo.shareprice.md) | | number | Price of the shares | | [shareSaleCooldown](./bitburner.corporationinfo.sharesalecooldown.md) | | number | Cooldown until shares can be sold again | | [totalShares](./bitburner.corporationinfo.totalshares.md) | | number | Total number of shares issued by this corporation. | +| [valuation](./bitburner.corporationinfo.valuation.md) | | number | Corporation valuation | diff --git a/markdown/bitburner.corporationinfo.valuation.md b/markdown/bitburner.corporationinfo.valuation.md new file mode 100644 index 000000000..7f9333048 --- /dev/null +++ b/markdown/bitburner.corporationinfo.valuation.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [CorporationInfo](./bitburner.corporationinfo.md) > [valuation](./bitburner.corporationinfo.valuation.md) + +## CorporationInfo.valuation property + +Corporation valuation + +**Signature:** + +```typescript +valuation: number; +``` diff --git a/src/NetscriptFunctions/Corporation.ts b/src/NetscriptFunctions/Corporation.ts index 5cbad188c..a044b16f1 100644 --- a/src/NetscriptFunctions/Corporation.ts +++ b/src/NetscriptFunctions/Corporation.ts @@ -685,6 +685,7 @@ export function NetscriptCorporation(): InternalAPI { nextState: corporation.state.nextName, prevState: corporation.state.prevName, divisions: [...corporation.divisions.keys()], + valuation: corporation.valuation, }; setDeprecatedProperties(data, { state: { diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 3d45508ca..6fe06ecbb 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -9172,6 +9172,8 @@ interface CorporationInfo { prevState: CorpStateName; /** Array of all division names */ divisions: string[]; + /** Corporation valuation */ + valuation: number; } /**