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