Expose dividend info through ns.corporation.getCorporation()

This commit is contained in:
Staszek Welsh 2022-05-30 22:21:27 +01:00
parent e28fe3e31d
commit c117b55df9
2 changed files with 9 additions and 0 deletions

@ -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)),
};

@ -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 */