diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 18fda54f9..a302347e5 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -1,5 +1,5 @@ import { Augmentation } from "./Augmentation"; -import { Augmentations } from "./Augmentations"; +import { StaticAugmentations } from "./StaticAugmentations"; import { PlayerOwnedAugmentation, IPlayerOwnedAugmentation } from "./PlayerOwnedAugmentation"; import { AugmentationNames } from "./data/AugmentationNames"; @@ -23,7 +23,7 @@ import { import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers"; import { Router } from "../ui/GameRoot"; -export function AddToAugmentations(aug: Augmentation): void { +export function AddToStaticAugmentations(aug: Augmentation): void { const name = aug.name; Augmentations[name] = aug; } @@ -44,6 +44,7 @@ export function getNextNeuroFluxLevel(): number { } } return currLevel + 1; + StaticAugmentations[name] = aug; } function createAugmentations(): void { @@ -67,7 +68,7 @@ function resetFactionAugmentations(): void { function initAugmentations(): void { resetFactionAugmentations(); - clearObject(Augmentations); + clearObject(StaticAugmentations); createAugmentations(); updateAugmentationCosts(); Player.reapplyAllAugmentations(); @@ -127,17 +128,17 @@ function resetAugmentation(aug: Augmentation): void { aug.addToFactions(aug.factions); const name = aug.name; if (augmentationExists(name)) { - delete Augmentations[name]; + delete StaticAugmentations[name]; } - AddToAugmentations(aug); + AddToStaticAugmentations(aug); } function applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void { - const augObj = Augmentations[aug.name]; + const staticAugmentation = StaticAugmentations[aug.name]; // Apply multipliers - for (const mult of Object.keys(augObj.mults)) { - const v = Player.getMult(mult) * augObj.mults[mult]; + for (const mult of Object.keys(staticAugmentation.mults)) { + const v = Player.getMult(mult) * staticAugmentation.mults[mult]; Player.setMult(mult, v); } @@ -183,7 +184,7 @@ function installAugmentations(force?: boolean): boolean { } for (let i = 0; i < Player.queuedAugmentations.length; ++i) { const ownedAug = Player.queuedAugmentations[i]; - const aug = Augmentations[ownedAug.name]; + const aug = StaticAugmentations[ownedAug.name]; if (aug == null) { console.error(`Invalid augmentation: ${ownedAug.name}`); continue; @@ -213,7 +214,7 @@ function installAugmentations(force?: boolean): boolean { } function augmentationExists(name: string): boolean { - return Augmentations.hasOwnProperty(name); + return StaticAugmentations.hasOwnProperty(name); } export function isRepeatableAug(aug: Augmentation): boolean { diff --git a/src/Augmentation/Augmentations.ts b/src/Augmentation/StaticAugmentations.ts similarity index 57% rename from src/Augmentation/Augmentations.ts rename to src/Augmentation/StaticAugmentations.ts index ed2eab639..768e52770 100644 --- a/src/Augmentation/Augmentations.ts +++ b/src/Augmentation/StaticAugmentations.ts @@ -1,4 +1,4 @@ import { Augmentation } from "./Augmentation"; import { IMap } from "../types"; -export const Augmentations: IMap = {}; +export const StaticAugmentations: IMap = {}; diff --git a/src/Augmentation/ui/AugmentationsRoot.tsx b/src/Augmentation/ui/AugmentationsRoot.tsx index fcb5bd861..edb38230d 100644 --- a/src/Augmentation/ui/AugmentationsRoot.tsx +++ b/src/Augmentation/ui/AugmentationsRoot.tsx @@ -22,7 +22,7 @@ import { Settings } from "../../Settings/Settings"; import { ConfirmationModal } from "../../ui/React/ConfirmationModal"; import { IPlayer } from "../../PersonObjects/IPlayer"; import { AugmentationNames } from "../data/AugmentationNames"; -import { Augmentations } from "../Augmentations"; +import { StaticAugmentations } from "../StaticAugmentations"; import { CONSTANTS } from "../../Constants"; import { formatNumber } from "../../utils/StringHelperFunctions"; import { Info } from "@mui/icons-material"; @@ -39,7 +39,9 @@ const NeuroFluxDisplay = ({ player }: NFGDisplayProps): React.ReactElement => { NeuroFlux Governor - Level {level} - {Augmentations[AugmentationNames.NeuroFluxGovernor].stats} + + {StaticAugmentations[AugmentationNames.NeuroFluxGovernor].stats} + ) : ( <> diff --git a/src/Augmentation/ui/InstalledAugmentations.tsx b/src/Augmentation/ui/InstalledAugmentations.tsx index d200ebfa6..1ec34391f 100644 --- a/src/Augmentation/ui/InstalledAugmentations.tsx +++ b/src/Augmentation/ui/InstalledAugmentations.tsx @@ -13,7 +13,7 @@ import React, { useState } from "react"; import { OwnedAugmentationsOrderSetting } from "../../Settings/SettingEnums"; import { Settings } from "../../Settings/Settings"; import { use } from "../../ui/Context"; -import { Augmentations } from "../Augmentations"; +import { StaticAugmentations } from "../StaticAugmentations"; import { AugmentationNames } from "../data/AugmentationNames"; export function InstalledAugmentations(): React.ReactElement { @@ -77,7 +77,7 @@ export function InstalledAugmentations(): React.ReactElement { {(() => { - const aug = Augmentations[selectedAug.name]; + const aug = StaticAugmentations[selectedAug.name]; const info = typeof aug.info === "string" ? {aug.info} : aug.info; const tooltip = ( diff --git a/src/Augmentation/ui/PlayerMultipliers.tsx b/src/Augmentation/ui/PlayerMultipliers.tsx index 5b69c8a36..0b1288bef 100644 --- a/src/Augmentation/ui/PlayerMultipliers.tsx +++ b/src/Augmentation/ui/PlayerMultipliers.tsx @@ -8,7 +8,7 @@ import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; import { Player } from "../../Player"; import { Settings } from "../../Settings/Settings"; import { numeralWrapper } from "../../ui/numeralFormat"; -import { Augmentations } from "../Augmentations"; +import { StaticAugmentations } from "../StaticAugmentations"; interface IAugmentedStats { [index: string]: number; @@ -17,7 +17,7 @@ interface IAugmentedStats { function calculateAugmentedStats(): IAugmentedStats { const augP: IAugmentedStats = {}; for (const aug of Player.queuedAugmentations) { - const augObj = Augmentations[aug.name]; + const augObj = StaticAugmentations[aug.name]; for (const mult of Object.keys(augObj.mults)) { const v = augP[mult] ? augP[mult] : 1; augP[mult] = v * augObj.mults[mult]; diff --git a/src/Augmentation/ui/PurchasedAugmentations.tsx b/src/Augmentation/ui/PurchasedAugmentations.tsx index f3982f035..d86c9d4f6 100644 --- a/src/Augmentation/ui/PurchasedAugmentations.tsx +++ b/src/Augmentation/ui/PurchasedAugmentations.tsx @@ -5,7 +5,7 @@ import { List, ListItemText, Paper, Tooltip, Typography } from "@mui/material"; import * as React from "react"; import { Player } from "../../Player"; -import { Augmentations } from "../Augmentations"; +import { StaticAugmentations } from "../StaticAugmentations"; import { AugmentationNames } from "../data/AugmentationNames"; export function PurchasedAugmentations(): React.ReactElement { @@ -23,7 +23,7 @@ export function PurchasedAugmentations(): React.ReactElement { let displayName = ownedAug.name; if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue; - const aug = Augmentations[ownedAug.name]; + const aug = StaticAugmentations[ownedAug.name]; let level = null; if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) { diff --git a/src/Faction/FactionHelpers.tsx b/src/Faction/FactionHelpers.tsx index 84519d5af..43b8d80b6 100644 --- a/src/Faction/FactionHelpers.tsx +++ b/src/Faction/FactionHelpers.tsx @@ -1,4 +1,4 @@ -import { Augmentations } from "../Augmentation/Augmentations"; +import { StaticAugmentations } from "../Augmentation/StaticAugmentations"; import { Augmentation } from "../Augmentation/Augmentation"; import { PlayerOwnedAugmentation } from "../Augmentation/PlayerOwnedAugmentation"; import { AugmentationNames } from "../Augmentation/data/AugmentationNames"; @@ -57,7 +57,7 @@ export function hasAugmentationPrereqs(aug: Augmentation): boolean { let hasPrereqs = true; if (aug.prereqs && aug.prereqs.length > 0) { for (let i = 0; i < aug.prereqs.length; ++i) { - const prereqAug = Augmentations[aug.prereqs[i]]; + const prereqAug = StaticAugmentations[aug.prereqs[i]]; if (prereqAug == null) { console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`); continue; @@ -162,7 +162,7 @@ export function processPassiveFactionRepGain(numCycles: number): void { export const getFactionAugmentationsFiltered = (player: IPlayer, faction: Faction): string[] => { // If player has a gang with this faction, return (almost) all augmentations if (player.hasGangWith(faction.name)) { - let augs = Object.values(Augmentations); + let augs = Object.values(StaticAugmentations); // Remove special augs augs = augs.filter((a) => !a.isSpecial); diff --git a/src/Faction/ui/AugmentationsPage.tsx b/src/Faction/ui/AugmentationsPage.tsx index 6e220240e..ea6b90e4c 100644 --- a/src/Faction/ui/AugmentationsPage.tsx +++ b/src/Faction/ui/AugmentationsPage.tsx @@ -5,7 +5,7 @@ import React, { useState } from "react"; import { PurchaseableAugmentation } from "./PurchaseableAugmentation"; -import { Augmentations } from "../../Augmentation/Augmentations"; +import { StaticAugmentations } from "../../Augmentation/StaticAugmentations"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Faction } from "../Faction"; import { PurchaseAugmentationsOrderSetting } from "../../Settings/SettingEnums"; @@ -63,8 +63,8 @@ export function AugmentationsPage(props: IProps): React.ReactElement { function getAugsSortedByCost(): string[] { const augs = getAugs(); augs.sort((augName1, augName2) => { - const aug1 = Augmentations[augName1], - aug2 = Augmentations[augName2]; + const aug1 = StaticAugmentations[augName1], + aug2 = StaticAugmentations[augName2]; if (aug1 == null || aug2 == null) { throw new Error("Invalid Augmentation Names"); } @@ -78,16 +78,16 @@ export function AugmentationsPage(props: IProps): React.ReactElement { function getAugsSortedByPurchasable(): string[] { const augs = getAugs(); function canBuy(augName: string): boolean { - const aug = Augmentations[augName]; const repCost = aug.baseRepRequirement; + const aug = StaticAugmentations[augName]; const hasReq = props.faction.playerReputation >= repCost; const hasRep = hasAugmentationPrereqs(aug); const hasCost = aug.baseCost !== 0 && player.money > aug.baseCost; return hasCost && hasReq && hasRep; } const buy = augs.filter(canBuy).sort((augName1, augName2) => { - const aug1 = Augmentations[augName1], - aug2 = Augmentations[augName2]; + const aug1 = StaticAugmentations[augName1], + aug2 = StaticAugmentations[augName2]; if (aug1 == null || aug2 == null) { throw new Error("Invalid Augmentation Names"); } @@ -97,8 +97,8 @@ export function AugmentationsPage(props: IProps): React.ReactElement { const cantBuy = augs .filter((aug) => !canBuy(aug)) .sort((augName1, augName2) => { - const aug1 = Augmentations[augName1], - aug2 = Augmentations[augName2]; + const aug1 = StaticAugmentations[augName1], + aug2 = StaticAugmentations[augName2]; if (aug1 == null || aug2 == null) { throw new Error("Invalid Augmentation Names"); } @@ -111,8 +111,8 @@ export function AugmentationsPage(props: IProps): React.ReactElement { function getAugsSortedByReputation(): string[] { const augs = getAugs(); augs.sort((augName1, augName2) => { - const aug1 = Augmentations[augName1], - aug2 = Augmentations[augName2]; + const aug1 = StaticAugmentations[augName1], + aug2 = StaticAugmentations[augName2]; if (aug1 == null || aug2 == null) { throw new Error("Invalid Augmentation Names"); } diff --git a/src/Faction/ui/PurchaseableAugmentation.tsx b/src/Faction/ui/PurchaseableAugmentation.tsx index feebb29e0..9446faf5e 100644 --- a/src/Faction/ui/PurchaseableAugmentation.tsx +++ b/src/Faction/ui/PurchaseableAugmentation.tsx @@ -7,7 +7,7 @@ import React, { useState } from "react"; import { hasAugmentationPrereqs, purchaseAugmentation } from "../FactionHelpers"; import { PurchaseAugmentationModal } from "./PurchaseAugmentationModal"; -import { Augmentations } from "../../Augmentation/Augmentations"; +import { StaticAugmentations } from "../../Augmentation/StaticAugmentations"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Faction } from "../Faction"; import { IPlayer } from "../../PersonObjects/IPlayer"; @@ -35,7 +35,7 @@ interface IReqProps { } function Requirements(props: IReqProps): React.ReactElement { - const aug = Augmentations[props.augName]; + const aug = StaticAugmentations[props.augName]; if (!props.hasReq) { return ( @@ -75,7 +75,7 @@ interface IProps { export function PurchaseableAugmentation(props: IProps): React.ReactElement { const [open, setOpen] = useState(false); - const aug = Augmentations[props.augName]; + const aug = StaticAugmentations[props.augName]; if (aug == null) throw new Error(`aug ${props.augName} does not exists`); if (aug == null) { diff --git a/src/NetscriptFunctions/Grafting.ts b/src/NetscriptFunctions/Grafting.ts index 577336570..bfaf8bc70 100644 --- a/src/NetscriptFunctions/Grafting.ts +++ b/src/NetscriptFunctions/Grafting.ts @@ -1,4 +1,4 @@ -import { Augmentations } from "../Augmentation/Augmentations"; +import { StaticAugmentations } from "../Augmentation/StaticAugmentations"; import { hasAugmentationPrereqs } from "../Faction/FactionHelpers"; import { CityName } from "../Locations/data/CityNames"; import { getRamCost } from "../Netscript/RamCostGenerator"; @@ -28,10 +28,10 @@ export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, h updateRam("getAugmentationGraftPrice"); const augName = helper.string("getAugmentationGraftPrice", "augName", _augName); checkGraftingAPIAccess("getAugmentationGraftPrice"); - if (!getGraftingAvailableAugs(player).includes(augName) || !Augmentations.hasOwnProperty(augName)) { + if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) { throw helper.makeRuntimeErrorMsg("grafting.getAugmentationGraftPrice", `Invalid aug: ${augName}`); } - const craftableAug = new GraftableAugmentation(Augmentations[augName]); + const craftableAug = new GraftableAugmentation(StaticAugmentations[augName]); return craftableAug.cost; }, @@ -39,10 +39,10 @@ export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, h updateRam("getAugmentationGraftTime"); const augName = helper.string("getAugmentationGraftTime", "augName", _augName); checkGraftingAPIAccess("getAugmentationGraftTime"); - if (!getGraftingAvailableAugs(player).includes(augName) || !Augmentations.hasOwnProperty(augName)) { + if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) { throw helper.makeRuntimeErrorMsg("grafting.getAugmentationGraftTime", `Invalid aug: ${augName}`); } - const craftableAug = new GraftableAugmentation(Augmentations[augName]); + const craftableAug = new GraftableAugmentation(StaticAugmentations[augName]); return craftableAug.time; }, @@ -64,7 +64,7 @@ export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, h "You must be in New Tokyo to begin grafting an Augmentation.", ); } - if (!getGraftingAvailableAugs(player).includes(augName) || !Augmentations.hasOwnProperty(augName)) { + if (!getGraftingAvailableAugs(player).includes(augName) || !StaticAugmentations.hasOwnProperty(augName)) { workerScript.log("grafting.graftAugmentation", () => `Invalid aug: ${augName}`); return false; } @@ -75,7 +75,7 @@ export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, h workerScript.log("graftAugmentation", () => txt); } - const craftableAug = new GraftableAugmentation(Augmentations[augName]); + const craftableAug = new GraftableAugmentation(StaticAugmentations[augName]); if (player.money < craftableAug.cost) { workerScript.log("grafting.graftAugmentation", () => `You don't have enough money to craft ${augName}`); return false; diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index 0124e1e90..9921b0ce6 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -3,7 +3,7 @@ import { IPlayer } from "../PersonObjects/IPlayer"; import { purchaseAugmentation, joinFaction, getFactionAugmentationsFiltered } from "../Faction/FactionHelpers"; import { startWorkerScript } from "../NetscriptWorker"; import { Augmentation } from "../Augmentation/Augmentation"; -import { Augmentations } from "../Augmentation/Augmentations"; +import { StaticAugmentations } from "../Augmentation/StaticAugmentations"; import { augmentationExists, installAugmentations } from "../Augmentation/AugmentationHelpers"; import { AugmentationNames } from "../Augmentation/data/AugmentationNames"; import { killWorkerScript } from "../Netscript/killWorkerScript"; @@ -56,7 +56,7 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript throw _ctx.helper.makeRuntimeErrorMsg(`Invalid augmentation: '${name}'`); } - return Augmentations[name]; + return StaticAugmentations[name]; }; const getFaction = function (_ctx: NetscriptContext, name: string): Faction { diff --git a/src/NetscriptFunctions/Sleeve.ts b/src/NetscriptFunctions/Sleeve.ts index 6b7751001..d3aafceb6 100644 --- a/src/NetscriptFunctions/Sleeve.ts +++ b/src/NetscriptFunctions/Sleeve.ts @@ -5,7 +5,7 @@ import { FactionWorkType } from "../Faction/FactionWorkTypeEnum"; import { SleeveTaskType } from "../PersonObjects/Sleeve/SleeveTaskTypesEnum"; import { WorkerScript } from "../Netscript/WorkerScript"; import { findSleevePurchasableAugs } from "../PersonObjects/Sleeve/SleeveHelpers"; -import { Augmentations } from "../Augmentation/Augmentations"; +import { StaticAugmentations } from "../Augmentation/StaticAugmentations"; import { CityName } from "../Locations/data/CityNames"; import { findCrime } from "../Crime/CrimeHelpers"; @@ -298,7 +298,7 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel throw helper.makeRuntimeErrorMsg("sleeve.purchaseSleeveAug", `Sleeve shock too high: Sleeve ${sleeveNumber}`); } - const aug = Augmentations[augName]; + const aug = StaticAugmentations[augName]; if (!aug) { throw helper.makeRuntimeErrorMsg("sleeve.purchaseSleeveAug", `Invalid aug: ${augName}`); } diff --git a/src/PersonObjects/Grafting/GraftingHelpers.ts b/src/PersonObjects/Grafting/GraftingHelpers.ts index 35d4d7946..549f5babd 100644 --- a/src/PersonObjects/Grafting/GraftingHelpers.ts +++ b/src/PersonObjects/Grafting/GraftingHelpers.ts @@ -1,11 +1,11 @@ -import { Augmentations } from "../../Augmentation/Augmentations"; +import { StaticAugmentations } from "../../Augmentation/StaticAugmentations"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { IPlayer } from "../IPlayer"; export const getGraftingAvailableAugs = (player: IPlayer): string[] => { const augs: string[] = []; - for (const [augName, aug] of Object.entries(Augmentations)) { + for (const [augName, aug] of Object.entries(StaticAugmentations)) { if (augName === AugmentationNames.NeuroFluxGovernor || augName === AugmentationNames.TheRedPill || aug.isSpecial) continue; augs.push(augName); diff --git a/src/PersonObjects/Grafting/ui/GraftingRoot.tsx b/src/PersonObjects/Grafting/ui/GraftingRoot.tsx index 34e3a1a61..f6c90ae56 100644 --- a/src/PersonObjects/Grafting/ui/GraftingRoot.tsx +++ b/src/PersonObjects/Grafting/ui/GraftingRoot.tsx @@ -2,7 +2,7 @@ import { Construction, CheckBox, CheckBoxOutlineBlank } from "@mui/icons-materia import { Box, Button, Container, List, ListItemButton, Paper, Typography } from "@mui/material"; import React, { useState } from "react"; import { Augmentation } from "../../../Augmentation/Augmentation"; -import { Augmentations } from "../../../Augmentation/Augmentations"; +import { StaticAugmentations } from "../../../Augmentation/StaticAugmentations"; import { AugmentationNames } from "../../../Augmentation/data/AugmentationNames"; import { CONSTANTS } from "../../../Constants"; import { hasAugmentationPrereqs } from "../../../Faction/FactionHelpers"; @@ -54,7 +54,7 @@ export const GraftingRoot = (): React.ReactElement => { const player = use.Player(); const router = use.Router(); - for (const aug of Object.values(Augmentations)) { + for (const aug of Object.values(StaticAugmentations)) { const name = aug.name; const graftableAug = new GraftableAugmentation(aug); GraftableAugmentations[name] = graftableAug; @@ -62,7 +62,7 @@ export const GraftingRoot = (): React.ReactElement => { const [selectedAug, setSelectedAug] = useState(getGraftingAvailableAugs(player)[0]); const [graftOpen, setGraftOpen] = useState(false); - + const selectedAugmentation = StaticAugmentations[selectedAug]; return ( @@ -136,22 +136,25 @@ export const GraftingRoot = (): React.ReactElement => { )} {/* Use formula so the displayed creation time is accurate to player bonus */} - {Augmentations[selectedAug].prereqs.length > 0 && ( - + {selectedAugmentation.prereqs.length > 0 && ( + )}
{(() => { - const aug = Augmentations[selectedAug]; - - const info = typeof aug.info === "string" ? {aug.info} : aug.info; + const info = + typeof selectedAugmentation.info === "string" ? ( + {selectedAugmentation.info} + ) : ( + selectedAugmentation.info + ); const tooltip = ( <> {info}

- {aug.stats} + {selectedAugmentation.stats} ); return tooltip; diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx index a45df0b32..da4270681 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx @@ -1,6 +1,5 @@ import { IPlayer } from "../IPlayer"; import { PlayerObject } from "./PlayerObject"; -import { Augmentations } from "../../Augmentation/Augmentations"; import { applyAugmentation } from "../../Augmentation/AugmentationHelpers"; import { PlayerOwnedAugmentation } from "../../Augmentation/PlayerOwnedAugmentation"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; @@ -1374,7 +1373,7 @@ export function craftAugmentationWork(this: IPlayer, numCycles: number): boolean export function finishGraftAugmentationWork(this: IPlayer, cancelled: boolean): string { const augName = this.graftAugmentationName; if (cancelled === false) { - applyAugmentation(Augmentations[augName]); + applyAugmentation({ name: augName, level: 1 }); if (!this.hasAugmentation(AugmentationNames.CongruityImplant)) { this.entropy += 1; diff --git a/src/PersonObjects/Sleeve/SleeveHelpers.ts b/src/PersonObjects/Sleeve/SleeveHelpers.ts index 76bde04e8..402547632 100644 --- a/src/PersonObjects/Sleeve/SleeveHelpers.ts +++ b/src/PersonObjects/Sleeve/SleeveHelpers.ts @@ -4,7 +4,7 @@ import { Sleeve } from "./Sleeve"; import { IPlayer } from "../IPlayer"; import { Augmentation } from "../../Augmentation/Augmentation"; -import { Augmentations } from "../../Augmentation/Augmentations"; +import { StaticAugmentations } from "../../Augmentation/StaticAugmentations"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Faction } from "../../Faction/Faction"; import { Factions } from "../../Faction/Factions"; @@ -68,8 +68,8 @@ export function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentat if (p.inGang()) { const fac = p.getGangFaction(); - for (const augName of Object.keys(Augmentations)) { - const aug = Augmentations[augName]; + for (const augName of Object.keys(StaticAugmentations)) { + const aug = StaticAugmentations[augName]; if (!isAvailableForSleeve(aug)) { continue; } @@ -93,7 +93,7 @@ export function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentat } for (const augName of fac.augmentations) { - const aug: Augmentation = Augmentations[augName]; + const aug: Augmentation = StaticAugmentations[augName]; if (!isAvailableForSleeve(aug)) { continue; } diff --git a/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx b/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx index e17118e8c..c3db83ec3 100644 --- a/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx +++ b/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; import { Sleeve } from "../Sleeve"; import { findSleevePurchasableAugs } from "../SleeveHelpers"; -import { Augmentations } from "../../../Augmentation/Augmentations"; +import { StaticAugmentations } from "../../../Augmentation/StaticAugmentations"; import { Augmentation } from "../../../Augmentation/Augmentation"; import { Money } from "../../../ui/React/Money"; import { Modal } from "../../../ui/React/Modal"; @@ -93,7 +93,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement { Owned Augmentations: {ownedAugNames.map((augName) => { - const aug = Augmentations[augName]; + const aug = StaticAugmentations[augName]; const info = typeof aug.info === "string" ? {aug.info} : aug.info; const tooltip = ( <> diff --git a/src/Prestige.ts b/src/Prestige.ts index fec16b409..a643018af 100755 --- a/src/Prestige.ts +++ b/src/Prestige.ts @@ -1,6 +1,6 @@ import { FactionNames } from "./Faction/data/FactionNames"; import { CityName } from "./Locations/data/CityNames"; -import { Augmentations } from "./Augmentation/Augmentations"; +import { StaticAugmentations } from "./Augmentation/StaticAugmentations"; import { augmentationExists, initAugmentations } from "./Augmentation/AugmentationHelpers"; import { AugmentationNames } from "./Augmentation/data/AugmentationNames"; import { initBitNodeMultipliers } from "./BitNode/BitNode"; @@ -225,9 +225,9 @@ export function prestigeSourceFile(flume: boolean): void { } // Delete all Augmentations - for (const name of Object.keys(Augmentations)) { - if (Augmentations.hasOwnProperty(name)) { - delete Augmentations[name]; + for (const name of Object.keys(StaticAugmentations)) { + if (StaticAugmentations.hasOwnProperty(name)) { + delete StaticAugmentations[name]; } }