mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-28 08:57:32 +01:00
Expose dividend info through ns.corporation.getCorporation()
This commit is contained in:
parent
e28fe3e31d
commit
c117b55df9
@ -952,6 +952,9 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
|
||||
shareSaleCooldown: corporation.shareSaleCooldown,
|
||||
issuedShares: corporation.issuedShares,
|
||||
sharePrice: corporation.sharePrice,
|
||||
dividendRate: corporation.dividendRate,
|
||||
dividendTax: corporation.dividendTax,
|
||||
dividendEarnings: corporation.getDividends() / CorporationConstants.SecsPerMarketCycle,
|
||||
state: corporation.state.getState(),
|
||||
divisions: corporation.divisions.map((division): NSDivision => getSafeDivision(division)),
|
||||
};
|
||||
|
6
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
6
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -7100,6 +7100,12 @@ interface CorporationInfo {
|
||||
issuedShares: number;
|
||||
/** Price of the shares */
|
||||
sharePrice: number;
|
||||
/** Fraction of profits issued as dividends */
|
||||
dividendRate: number;
|
||||
/** Tax applied on your earnings as a shareholder */
|
||||
dividendTax: number;
|
||||
/** Your earnings as a shareholder per second this cycle */
|
||||
dividendEarnings: number;
|
||||
/** State of the corporation. Possible states are START, PURCHASE, PRODUCTION, SALE, EXPORT. */
|
||||
state: string;
|
||||
/** Array of all divisions */
|
||||
|
Loading…
Reference in New Issue
Block a user