remove unnecessary function

This commit is contained in:
Snarling 2022-09-27 16:15:11 -04:00
parent 38063f62a7
commit 3d4d02a573
3 changed files with 4 additions and 39 deletions

@ -21,7 +21,7 @@ import {
initUnstableCircadianModulator,
} from "./data/AugmentationCreator";
import { Router } from "../ui/GameRoot";
import { mergeAugmentation } from "../PersonObjects/Multipliers";
import { mergeMultipliers } from "../PersonObjects/Multipliers";
export function AddToStaticAugmentations(aug: Augmentation): void {
const name = aug.name;
@ -75,7 +75,7 @@ function applyAugmentation(aug: PlayerOwnedAugmentation, reapply = false): void
const staticAugmentation = StaticAugmentations[aug.name];
// Apply multipliers
Player.mults = mergeAugmentation(Player.mults, staticAugmentation.mults);
Player.mults = mergeMultipliers(Player.mults, staticAugmentation.mults);
// Special logic for Congruity Implant
if (aug.name === AugmentationNames.CongruityImplant && !reapply) {

@ -4,7 +4,7 @@
import { DoubleArrow } from "@mui/icons-material";
import { List, ListItem, ListItemText, Paper, Typography } from "@mui/material";
import * as React from "react";
import { Multipliers, defaultMultipliers, mergeAugmentation } from "../../PersonObjects/Multipliers";
import { Multipliers, defaultMultipliers, mergeMultipliers } from "../../PersonObjects/Multipliers";
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
import { Player } from "../../Player";
import { Settings } from "../../Settings/Settings";
@ -15,7 +15,7 @@ function calculateAugmentedStats(): Multipliers {
let augP: Multipliers = defaultMultipliers();
for (const aug of Player.queuedAugmentations) {
const augObj = StaticAugmentations[aug.name];
augP = mergeAugmentation(augP, augObj.mults);
augP = mergeMultipliers(augP, augObj.mults);
}
return augP;
}

@ -68,41 +68,6 @@ export const defaultMultipliers = (): Multipliers => {
};
};
export const mergeAugmentation = (m0: Multipliers, m1: AugmentationStats): Multipliers => {
return {
hacking_chance: m0.hacking_chance * (m1.hacking_chance ?? 1),
hacking_speed: m0.hacking_speed * (m1.hacking_speed ?? 1),
hacking_money: m0.hacking_money * (m1.hacking_money ?? 1),
hacking_grow: m0.hacking_grow * (m1.hacking_grow ?? 1),
hacking: m0.hacking * (m1.hacking ?? 1),
hacking_exp: m0.hacking_exp * (m1.hacking_exp ?? 1),
strength: m0.strength * (m1.strength ?? 1),
strength_exp: m0.strength_exp * (m1.strength_exp ?? 1),
defense: m0.defense * (m1.defense ?? 1),
defense_exp: m0.defense_exp * (m1.defense_exp ?? 1),
dexterity: m0.dexterity * (m1.dexterity ?? 1),
dexterity_exp: m0.dexterity_exp * (m1.dexterity_exp ?? 1),
agility: m0.agility * (m1.agility ?? 1),
agility_exp: m0.agility_exp * (m1.agility_exp ?? 1),
charisma: m0.charisma * (m1.charisma ?? 1),
charisma_exp: m0.charisma_exp * (m1.charisma_exp ?? 1),
hacknet_node_money: m0.hacknet_node_money * (m1.hacknet_node_money ?? 1),
hacknet_node_purchase_cost: m0.hacknet_node_purchase_cost * (m1.hacknet_node_purchase_cost ?? 1),
hacknet_node_ram_cost: m0.hacknet_node_ram_cost * (m1.hacknet_node_ram_cost ?? 1),
hacknet_node_core_cost: m0.hacknet_node_core_cost * (m1.hacknet_node_core_cost ?? 1),
hacknet_node_level_cost: m0.hacknet_node_level_cost * (m1.hacknet_node_level_cost ?? 1),
company_rep: m0.company_rep * (m1.company_rep ?? 1),
faction_rep: m0.faction_rep * (m1.faction_rep ?? 1),
work_money: m0.work_money * (m1.work_money ?? 1),
crime_success: m0.crime_success * (m1.crime_success ?? 1),
crime_money: m0.crime_money * (m1.crime_money ?? 1),
bladeburner_max_stamina: m0.bladeburner_max_stamina * (m1.bladeburner_max_stamina ?? 1),
bladeburner_stamina_gain: m0.bladeburner_stamina_gain * (m1.bladeburner_stamina_gain ?? 1),
bladeburner_analysis: m0.bladeburner_analysis * (m1.bladeburner_analysis ?? 1),
bladeburner_success_chance: m0.bladeburner_success_chance * (m1.bladeburner_success_chance ?? 1),
};
};
export const mergeMultipliers = (m0: Multipliers, m1: Multipliers): Multipliers => {
return {
hacking_chance: m0.hacking_chance * m1.hacking_chance,