mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
Rename getDividends to getCycleDividends for clarity
This commit is contained in:
parent
4a3558098c
commit
eb46e4d156
@ -133,7 +133,7 @@ export class Corporation {
|
||||
} else {
|
||||
const totalDividends = this.dividendRate * cycleProfit;
|
||||
const retainedEarnings = cycleProfit - totalDividends;
|
||||
player.gainMoney(this.getDividends(), "corporation");
|
||||
player.gainMoney(this.getCycleDividends(), "corporation");
|
||||
this.addFunds(retainedEarnings);
|
||||
}
|
||||
} else {
|
||||
@ -157,7 +157,7 @@ export class Corporation {
|
||||
}
|
||||
}
|
||||
|
||||
getDividends(): number {
|
||||
getCycleDividends(): number {
|
||||
const profit = this.revenue - this.expenses;
|
||||
const cycleProfit = profit * CorporationConstants.SecsPerMarketCycle;
|
||||
const totalDividends = this.dividendRate * cycleProfit;
|
||||
|
@ -55,6 +55,6 @@ export interface ICorporation {
|
||||
getScientificResearchMultiplier(): number;
|
||||
getStarterGuide(player: IPlayer): void;
|
||||
updateDividendTax(): void;
|
||||
getDividends(): number;
|
||||
getCycleDividends(): number;
|
||||
toJSON(): any;
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ function DividendsStats({ profit }: IDividendsStatsProps): React.ReactElement {
|
||||
const totalDividends = corp.dividendRate * profit;
|
||||
const retainedEarnings = profit - totalDividends;
|
||||
const dividendsPerShare = totalDividends / corp.totalShares;
|
||||
const playerEarnings = corp.getDividends() / CorporationConstants.SecsPerMarketCycle;
|
||||
const playerEarnings = corp.getCycleDividends() / CorporationConstants.SecsPerMarketCycle;
|
||||
return (
|
||||
<StatsTable
|
||||
rows={[
|
||||
|
@ -955,7 +955,7 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
|
||||
sharePrice: corporation.sharePrice,
|
||||
dividendRate: corporation.dividendRate,
|
||||
dividendTax: corporation.dividendTax,
|
||||
dividendEarnings: corporation.getDividends() / CorporationConstants.SecsPerMarketCycle,
|
||||
dividendEarnings: corporation.getCycleDividends() / CorporationConstants.SecsPerMarketCycle,
|
||||
state: corporation.state.getState(),
|
||||
divisions: corporation.divisions.map((division): NSDivision => getSafeDivision(division)),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user