mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-25 07:32:27 +01:00
fix Sleeve UI gains
This commit is contained in:
parent
c5cbbb2fbd
commit
2e4e7fadfc
@ -13,6 +13,7 @@ import {
|
|||||||
getHackingWorkRepGain,
|
getHackingWorkRepGain,
|
||||||
} from "../../../PersonObjects/formulas/reputation";
|
} from "../../../PersonObjects/formulas/reputation";
|
||||||
import { scaleWorkStats, WorkStats } from "../../../Work/WorkStats";
|
import { scaleWorkStats, WorkStats } from "../../../Work/WorkStats";
|
||||||
|
import { BitNodeMultipliers } from "../../../BitNode/BitNodeMultipliers";
|
||||||
|
|
||||||
interface SleeveFactionWorkParams {
|
interface SleeveFactionWorkParams {
|
||||||
factionWorkType: FactionWorkType;
|
factionWorkType: FactionWorkType;
|
||||||
|
@ -16,6 +16,7 @@ import { isSleeveClassWork } from "../Work/SleeveClassWork";
|
|||||||
import { isSleeveFactionWork } from "../Work/SleeveFactionWork";
|
import { isSleeveFactionWork } from "../Work/SleeveFactionWork";
|
||||||
import { isSleeveCompanyWork } from "../Work/SleeveCompanyWork";
|
import { isSleeveCompanyWork } from "../Work/SleeveCompanyWork";
|
||||||
import { isSleeveCrimeWork } from "../Work/SleeveCrimeWork";
|
import { isSleeveCrimeWork } from "../Work/SleeveCrimeWork";
|
||||||
|
import { BitNodeMultipliers } from "../../../BitNode/BitNodeMultipliers";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
sleeve: Sleeve;
|
sleeve: Sleeve;
|
||||||
@ -100,51 +101,51 @@ export function EarningsElement(props: IProps): React.ReactElement {
|
|||||||
if (isSleeveCrimeWork(props.sleeve.currentWork)) {
|
if (isSleeveCrimeWork(props.sleeve.currentWork)) {
|
||||||
const gains = props.sleeve.currentWork.getExp();
|
const gains = props.sleeve.currentWork.getExp();
|
||||||
data = [
|
data = [
|
||||||
[`Money:`, <Money money={5 * gains.money} />],
|
[`Money:`, <Money money={5 * gains.money * BitNodeMultipliers.CrimeMoney} />],
|
||||||
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * gains.hackExp)}`],
|
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * gains.hackExp * BitNodeMultipliers.CrimeExpGain)}`],
|
||||||
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * gains.strExp)}`],
|
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * gains.strExp * BitNodeMultipliers.CrimeExpGain)}`],
|
||||||
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * gains.defExp)}`],
|
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * gains.defExp * BitNodeMultipliers.CrimeExpGain)}`],
|
||||||
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * gains.dexExp)}`],
|
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * gains.dexExp * BitNodeMultipliers.CrimeExpGain)}`],
|
||||||
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * gains.agiExp)}`],
|
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * gains.agiExp * BitNodeMultipliers.CrimeExpGain)}`],
|
||||||
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * gains.chaExp)}`],
|
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * gains.chaExp * BitNodeMultipliers.CrimeExpGain)}`],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (isSleeveClassWork(props.sleeve.currentWork)) {
|
if (isSleeveClassWork(props.sleeve.currentWork)) {
|
||||||
const rates = props.sleeve.currentWork.calculateRates(player, props.sleeve);
|
const rates = props.sleeve.currentWork.calculateRates(player, props.sleeve);
|
||||||
data = [
|
data = [
|
||||||
[`Money:`, <MoneyRate money={5 * rates.money} />],
|
[`Money:`, <MoneyRate money={5 * rates.money} />],
|
||||||
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * rates.hackExp)} / sec`],
|
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * rates.hackExp * BitNodeMultipliers.ClassGymExpGain)} / sec`],
|
||||||
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * rates.strExp)} / sec`],
|
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * rates.strExp * BitNodeMultipliers.ClassGymExpGain)} / sec`],
|
||||||
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * rates.defExp)} / sec`],
|
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * rates.defExp * BitNodeMultipliers.ClassGymExpGain)} / sec`],
|
||||||
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * rates.dexExp)} / sec`],
|
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * rates.dexExp * BitNodeMultipliers.ClassGymExpGain)} / sec`],
|
||||||
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * rates.agiExp)} / sec`],
|
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * rates.agiExp * BitNodeMultipliers.ClassGymExpGain)} / sec`],
|
||||||
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * rates.chaExp)} / sec`],
|
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * rates.chaExp * BitNodeMultipliers.ClassGymExpGain)} / sec`],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (isSleeveFactionWork(props.sleeve.currentWork)) {
|
if (isSleeveFactionWork(props.sleeve.currentWork)) {
|
||||||
const rates = props.sleeve.currentWork.getExpRates(props.sleeve);
|
const rates = props.sleeve.currentWork.getExpRates(props.sleeve);
|
||||||
const repGain = props.sleeve.currentWork.getReputationRate(props.sleeve);
|
const repGain = props.sleeve.currentWork.getReputationRate(props.sleeve);
|
||||||
data = [
|
data = [
|
||||||
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * rates.hackExp)} / sec`],
|
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * rates.hackExp * BitNodeMultipliers.FactionWorkExpGain)} / sec`],
|
||||||
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * rates.strExp)} / sec`],
|
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * rates.strExp * BitNodeMultipliers.FactionWorkExpGain)} / sec`],
|
||||||
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * rates.defExp)} / sec`],
|
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * rates.defExp * BitNodeMultipliers.FactionWorkExpGain)} / sec`],
|
||||||
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * rates.dexExp)} / sec`],
|
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * rates.dexExp * BitNodeMultipliers.FactionWorkExpGain)} / sec`],
|
||||||
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * rates.agiExp)} / sec`],
|
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * rates.agiExp * BitNodeMultipliers.FactionWorkExpGain)} / sec`],
|
||||||
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * rates.chaExp)} / sec`],
|
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * rates.chaExp * BitNodeMultipliers.FactionWorkExpGain)} / sec`],
|
||||||
[`Reputation:`, <ReputationRate reputation={5 * repGain} />],
|
[`Reputation:`, <ReputationRate reputation={5 * repGain * BitNodeMultipliers.FactionWorkRepGain} />],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSleeveCompanyWork(props.sleeve.currentWork)) {
|
if (isSleeveCompanyWork(props.sleeve.currentWork)) {
|
||||||
const rates = props.sleeve.currentWork.getGainRates(player, props.sleeve);
|
const rates = props.sleeve.currentWork.getGainRates(player, props.sleeve);
|
||||||
data = [
|
data = [
|
||||||
[`Money:`, <MoneyRate money={5 * rates.money} />],
|
[`Money:`, <MoneyRate money={5 * rates.money * BitNodeMultipliers.CompanyWorkMoney} />],
|
||||||
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * rates.hackExp)} / sec`],
|
[`Hacking Exp:`, `${numeralWrapper.formatExp(5 * rates.hackExp * BitNodeMultipliers.CompanyWorkExpGain)} / sec`],
|
||||||
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * rates.strExp)} / sec`],
|
[`Strength Exp:`, `${numeralWrapper.formatExp(5 * rates.strExp * BitNodeMultipliers.CompanyWorkExpGain)} / sec`],
|
||||||
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * rates.defExp)} / sec`],
|
[`Defense Exp:`, `${numeralWrapper.formatExp(5 * rates.defExp * BitNodeMultipliers.CompanyWorkExpGain)} / sec`],
|
||||||
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * rates.dexExp)} / sec`],
|
[`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * rates.dexExp * BitNodeMultipliers.CompanyWorkExpGain)} / sec`],
|
||||||
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * rates.agiExp)} / sec`],
|
[`Agility Exp:`, `${numeralWrapper.formatExp(5 * rates.agiExp * BitNodeMultipliers.CompanyWorkExpGain)} / sec`],
|
||||||
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * rates.chaExp)} / sec`],
|
[`Charisma Exp:`, `${numeralWrapper.formatExp(5 * rates.chaExp * BitNodeMultipliers.CompanyWorkExpGain)} / sec`],
|
||||||
[`Reputation:`, <ReputationRate reputation={5 * rates.reputation} />],
|
[`Reputation:`, <ReputationRate reputation={5 * rates.reputation} />],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user