mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-17 21:23:54 +01:00
ENUMS: Initial Enum Helper rework + Reorganization (#596)
This commit is contained in:
parent
6ed8ea9796
commit
6732549196
@ -12,6 +12,7 @@ module.exports = {
|
||||
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",
|
||||
"\\!!raw-loader!.*$": "<rootDir>/test/__mocks__/rawLoader.js",
|
||||
"@player": "<rootDir>/src/Player",
|
||||
"@enums": "<rootDir>/src/Enums",
|
||||
"@nsdefs": "<rootDir>/src/ScriptEditor/NetscriptDefinitions",
|
||||
"^monaco-editor$": "<rootDir>/test/__mocks__/monacoMock.js",
|
||||
"^monaco-vim$": "<rootDir>/test/__mocks__/monacoMock.js",
|
||||
|
@ -1,8 +1,17 @@
|
||||
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
||||
import type { PlayerObject } from "../PersonObjects/Player/PlayerObject";
|
||||
|
||||
import {
|
||||
AugmentationName,
|
||||
BlackOperationName,
|
||||
CityName,
|
||||
CompletedProgramName,
|
||||
CorpUnlockName,
|
||||
FactionName,
|
||||
IndustryType,
|
||||
} from "@enums";
|
||||
import { SkillNames } from "../Bladeburner/data/SkillNames";
|
||||
import { Skills } from "../Bladeburner/Skills";
|
||||
import { CONSTANTS } from "../Constants";
|
||||
import { CorpUnlockName, IndustryType } from "../Corporation/data/Enums";
|
||||
import { Exploit } from "../Exploits/Exploit";
|
||||
import { Factions } from "../Faction/Factions";
|
||||
import { AllGangs } from "../Gang/AllGangs";
|
||||
@ -11,22 +20,17 @@ import { HacknetNodeConstants, HacknetServerConstants } from "../Hacknet/data/Co
|
||||
import { hasHacknetServers } from "../Hacknet/HacknetHelpers";
|
||||
import { HacknetNode } from "../Hacknet/HacknetNode";
|
||||
import { HacknetServer } from "../Hacknet/HacknetServer";
|
||||
import { CityName } from "../Enums";
|
||||
import { Player } from "@player";
|
||||
import { CompletedProgramName } from "../Programs/Programs";
|
||||
import { GetAllServers, GetServer } from "../Server/AllServers";
|
||||
import { SpecialServers } from "../Server/data/SpecialServers";
|
||||
import { Server } from "../Server/Server";
|
||||
import { Router } from "../ui/GameRoot";
|
||||
import { Page } from "../ui/Router";
|
||||
import data from "./AchievementData.json";
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
|
||||
import { isClassWork } from "../Work/ClassWork";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
import { workerScripts } from "../Netscript/WorkerScripts";
|
||||
|
||||
import type { PlayerObject } from "../PersonObjects/Player/PlayerObject";
|
||||
import { getRecordValues } from "../Types/Record";
|
||||
|
||||
// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...
|
||||
@ -62,7 +66,7 @@ function bitNodeFinishedState(): boolean {
|
||||
const wd = GetServer(SpecialServers.WorldDaemon);
|
||||
if (!(wd instanceof Server)) return false;
|
||||
if (wd.backdoorInstalled) return true;
|
||||
return Player.bladeburner !== null && BlackOperationNames.OperationDaedalus in Player.bladeburner.blackops;
|
||||
return Player.bladeburner !== null && BlackOperationName.OperationDaedalus in Player.bladeburner.blackops;
|
||||
}
|
||||
|
||||
function hasAccessToSF(player: PlayerObject, bn: number): boolean {
|
||||
@ -88,40 +92,40 @@ function sfAchievement(): Achievement[] {
|
||||
}
|
||||
|
||||
export const achievements: Record<string, Achievement> = {
|
||||
[FactionNames.CyberSec.toUpperCase()]: {
|
||||
...achievementData[FactionNames.CyberSec.toUpperCase()],
|
||||
[FactionName.CyberSec.toUpperCase()]: {
|
||||
...achievementData[FactionName.CyberSec.toUpperCase()],
|
||||
Icon: "CSEC",
|
||||
Condition: () => Player.factions.includes(FactionNames.CyberSec),
|
||||
Condition: () => Player.factions.includes(FactionName.CyberSec),
|
||||
},
|
||||
[FactionNames.NiteSec.toUpperCase()]: {
|
||||
...achievementData[FactionNames.NiteSec.toUpperCase()],
|
||||
Icon: FactionNames.NiteSec,
|
||||
Condition: () => Player.factions.includes(FactionNames.NiteSec),
|
||||
[FactionName.NiteSec.toUpperCase()]: {
|
||||
...achievementData[FactionName.NiteSec.toUpperCase()],
|
||||
Icon: FactionName.NiteSec,
|
||||
Condition: () => Player.factions.includes(FactionName.NiteSec),
|
||||
},
|
||||
THE_BLACK_HAND: {
|
||||
...achievementData.THE_BLACK_HAND,
|
||||
Icon: "TBH",
|
||||
Condition: () => Player.factions.includes(FactionNames.TheBlackHand),
|
||||
Condition: () => Player.factions.includes(FactionName.TheBlackHand),
|
||||
},
|
||||
[FactionNames.BitRunners.toUpperCase()]: {
|
||||
...achievementData[FactionNames.BitRunners.toUpperCase()],
|
||||
Icon: FactionNames.BitRunners.toLowerCase(),
|
||||
Condition: () => Player.factions.includes(FactionNames.BitRunners),
|
||||
[FactionName.BitRunners.toUpperCase()]: {
|
||||
...achievementData[FactionName.BitRunners.toUpperCase()],
|
||||
Icon: FactionName.BitRunners.toLowerCase(),
|
||||
Condition: () => Player.factions.includes(FactionName.BitRunners),
|
||||
},
|
||||
[FactionNames.Daedalus.toUpperCase()]: {
|
||||
...achievementData[FactionNames.Daedalus.toUpperCase()],
|
||||
Icon: FactionNames.Daedalus.toLowerCase(),
|
||||
Condition: () => Player.factions.includes(FactionNames.Daedalus),
|
||||
[FactionName.Daedalus.toUpperCase()]: {
|
||||
...achievementData[FactionName.Daedalus.toUpperCase()],
|
||||
Icon: FactionName.Daedalus.toLowerCase(),
|
||||
Condition: () => Player.factions.includes(FactionName.Daedalus),
|
||||
},
|
||||
THE_COVENANT: {
|
||||
...achievementData.THE_COVENANT,
|
||||
Icon: FactionNames.TheCovenant.toLowerCase().replace(/ /g, ""),
|
||||
Condition: () => Player.factions.includes(FactionNames.TheCovenant),
|
||||
Icon: FactionName.TheCovenant.toLowerCase().replace(/ /g, ""),
|
||||
Condition: () => Player.factions.includes(FactionName.TheCovenant),
|
||||
},
|
||||
[FactionNames.Illuminati.toUpperCase()]: {
|
||||
...achievementData[FactionNames.Illuminati.toUpperCase()],
|
||||
Icon: FactionNames.Illuminati.toLowerCase(),
|
||||
Condition: () => Player.factions.includes(FactionNames.Illuminati),
|
||||
[FactionName.Illuminati.toUpperCase()]: {
|
||||
...achievementData[FactionName.Illuminati.toUpperCase()],
|
||||
Icon: FactionName.Illuminati.toLowerCase(),
|
||||
Condition: () => Player.factions.includes(FactionName.Illuminati),
|
||||
},
|
||||
"BRUTESSH.EXE": {
|
||||
...achievementData["BRUTESSH.EXE"],
|
||||
@ -269,7 +273,7 @@ export const achievements: Record<string, Achievement> = {
|
||||
NEUROFLUX_255: {
|
||||
...achievementData.NEUROFLUX_255,
|
||||
Icon: "nf255",
|
||||
Condition: () => Player.augmentations.some((a) => a.name === AugmentationNames.NeuroFluxGovernor && a.level >= 255),
|
||||
Condition: () => Player.augmentations.some((a) => a.name === AugmentationName.NeuroFluxGovernor && a.level >= 255),
|
||||
},
|
||||
NS2: {
|
||||
...achievementData.NS2,
|
||||
@ -730,7 +734,7 @@ export const achievements: Record<string, Achievement> = {
|
||||
Condition: () =>
|
||||
Player.bitNodeN === 13 &&
|
||||
bitNodeFinishedState() &&
|
||||
!Player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1),
|
||||
!Player.augmentations.some((a) => a.name === AugmentationName.StaneksGift1),
|
||||
},
|
||||
DEVMENU: {
|
||||
...achievementData.DEVMENU,
|
||||
|
@ -1,16 +1,14 @@
|
||||
// Class definition for a single Augmentation object
|
||||
import * as React from "react";
|
||||
|
||||
import type { CompletedProgramName } from "../Programs/Programs";
|
||||
import { AugmentationName, CompletedProgramName, FactionName } from "@enums";
|
||||
import { Faction } from "../Faction/Faction";
|
||||
import { Factions } from "../Faction/Factions";
|
||||
import { formatPercent } from "../ui/formatNumber";
|
||||
import { Money } from "../ui/React/Money";
|
||||
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import { Player } from "@player";
|
||||
import { AugmentationNames } from "./data/AugmentationNames";
|
||||
import { CONSTANTS } from "../Constants";
|
||||
import { StaticAugmentations } from "./StaticAugmentations";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
@ -532,7 +530,7 @@ export class Augmentation {
|
||||
let moneyCost = augmentationReference.baseCost;
|
||||
let repCost = augmentationReference.baseRepRequirement;
|
||||
|
||||
if (augmentationReference.name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (augmentationReference.name === AugmentationName.NeuroFluxGovernor) {
|
||||
let nextLevel = this.getLevel();
|
||||
--nextLevel;
|
||||
const multiplier = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);
|
||||
@ -542,7 +540,7 @@ export class Augmentation {
|
||||
for (let i = 0; i < Player.queuedAugmentations.length; ++i) {
|
||||
moneyCost *= getBaseAugmentationPriceMultiplier();
|
||||
}
|
||||
} else if (augmentationReference.factions.includes(FactionNames.ShadowsOfAnarchy)) {
|
||||
} else if (augmentationReference.factions.includes(FactionName.ShadowsOfAnarchy)) {
|
||||
const soaAugmentationNames = initSoAAugmentations().map((augmentation) => augmentation.name);
|
||||
const soaAugCount = soaAugmentationNames.filter((augmentationName) =>
|
||||
Player.hasAugmentation(augmentationName),
|
||||
@ -563,17 +561,17 @@ export class Augmentation {
|
||||
|
||||
getLevel(): number {
|
||||
// Get current Neuroflux level based on Player's augmentations
|
||||
if (this.name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (this.name === AugmentationName.NeuroFluxGovernor) {
|
||||
let currLevel = 0;
|
||||
for (let i = 0; i < Player.augmentations.length; ++i) {
|
||||
if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (Player.augmentations[i].name === AugmentationName.NeuroFluxGovernor) {
|
||||
currLevel = Player.augmentations[i].level;
|
||||
}
|
||||
}
|
||||
|
||||
// Account for purchased but uninstalled Augmentations
|
||||
for (let i = 0; i < Player.queuedAugmentations.length; ++i) {
|
||||
if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {
|
||||
if (Player.queuedAugmentations[i].name == AugmentationName.NeuroFluxGovernor) {
|
||||
++currLevel;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Augmentation } from "./Augmentation";
|
||||
import { StaticAugmentations } from "./StaticAugmentations";
|
||||
import { PlayerOwnedAugmentation } from "./PlayerOwnedAugmentation";
|
||||
import { AugmentationNames } from "./data/AugmentationNames";
|
||||
import { AugmentationName, FactionName } from "@enums";
|
||||
|
||||
import { CONSTANTS } from "../Constants";
|
||||
import { Factions, factionExists } from "../Faction/Factions";
|
||||
@ -10,7 +10,6 @@ import { prestigeAugmentation } from "../Prestige";
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import {
|
||||
initBladeburnerAugmentations,
|
||||
initChurchOfTheMachineGodAugmentations,
|
||||
@ -34,8 +33,8 @@ function createAugmentations(): void {
|
||||
initUnstableCircadianModulator(),
|
||||
...initGeneralAugmentations(),
|
||||
...initSoAAugmentations(),
|
||||
...(factionExists(FactionNames.Bladeburners) ? initBladeburnerAugmentations() : []),
|
||||
...(factionExists(FactionNames.ChurchOfTheMachineGod) ? initChurchOfTheMachineGodAugmentations() : []),
|
||||
...(factionExists(FactionName.Bladeburners) ? initBladeburnerAugmentations() : []),
|
||||
...(factionExists(FactionName.ChurchOfTheMachineGod) ? initChurchOfTheMachineGodAugmentations() : []),
|
||||
].map(resetAugmentation);
|
||||
}
|
||||
|
||||
@ -74,14 +73,14 @@ function applyAugmentation(aug: PlayerOwnedAugmentation, reapply = false): void
|
||||
Player.mults = mergeMultipliers(Player.mults, staticAugmentation.mults);
|
||||
|
||||
// Special logic for Congruity Implant
|
||||
if (aug.name === AugmentationNames.CongruityImplant && !reapply) {
|
||||
if (aug.name === AugmentationName.CongruityImplant && !reapply) {
|
||||
Player.entropy = 0;
|
||||
Player.applyEntropy(Player.entropy);
|
||||
}
|
||||
|
||||
// Special logic for NeuroFlux Governor
|
||||
const ownedNfg = Player.augmentations.find((pAug) => pAug.name === AugmentationNames.NeuroFluxGovernor);
|
||||
if (aug.name === AugmentationNames.NeuroFluxGovernor && !reapply && ownedNfg) {
|
||||
const ownedNfg = Player.augmentations.find((pAug) => pAug.name === AugmentationName.NeuroFluxGovernor);
|
||||
if (aug.name === AugmentationName.NeuroFluxGovernor && !reapply && ownedNfg) {
|
||||
ownedNfg.level = aug.level;
|
||||
return;
|
||||
}
|
||||
@ -102,7 +101,7 @@ function installAugmentations(force?: boolean): boolean {
|
||||
let augmentationList = "";
|
||||
let nfgIndex = -1;
|
||||
for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {
|
||||
if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (Player.queuedAugmentations[i].name === AugmentationName.NeuroFluxGovernor) {
|
||||
nfgIndex = i;
|
||||
break;
|
||||
}
|
||||
@ -116,10 +115,10 @@ function installAugmentations(force?: boolean): boolean {
|
||||
}
|
||||
|
||||
applyAugmentation(Player.queuedAugmentations[i]);
|
||||
if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;
|
||||
if (ownedAug.name === AugmentationName.NeuroFluxGovernor && i !== nfgIndex) continue;
|
||||
|
||||
let level = "";
|
||||
if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (ownedAug.name === AugmentationName.NeuroFluxGovernor) {
|
||||
level = ` - ${ownedAug.level}`;
|
||||
}
|
||||
augmentationList += aug.name + level + "\n";
|
||||
@ -144,7 +143,7 @@ function augmentationExists(name: string): boolean {
|
||||
|
||||
export function isRepeatableAug(aug: Augmentation | string): boolean {
|
||||
const augName = typeof aug === "string" ? aug : aug.name;
|
||||
return augName === AugmentationNames.NeuroFluxGovernor;
|
||||
return augName === AugmentationName.NeuroFluxGovernor;
|
||||
}
|
||||
|
||||
export { installAugmentations, initAugmentations, applyAugmentation, augmentationExists };
|
||||
|
@ -1,4 +1,4 @@
|
||||
export enum AugmentationNames {
|
||||
export enum AugmentationName {
|
||||
Targeting1 = "Augmented Targeting I",
|
||||
Targeting2 = "Augmented Targeting II",
|
||||
Targeting3 = "Augmented Targeting III",
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ import Container from "@mui/material/Container";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { ConfirmationModal } from "../../ui/React/ConfirmationModal";
|
||||
import { Player } from "@player";
|
||||
import { AugmentationNames } from "../data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { StaticAugmentations } from "../StaticAugmentations";
|
||||
import { CONSTANTS } from "../../Constants";
|
||||
import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
@ -29,7 +29,7 @@ import { AlertEvents } from "../../ui/React/AlertManager";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
|
||||
const NeuroFluxDisplay = (): React.ReactElement => {
|
||||
const level = Player.augmentations.find((e) => e.name === AugmentationNames.NeuroFluxGovernor)?.level ?? 0;
|
||||
const level = Player.augmentations.find((e) => e.name === AugmentationName.NeuroFluxGovernor)?.level ?? 0;
|
||||
|
||||
const openBloodDonation = () => {
|
||||
AlertEvents.emit(
|
||||
@ -50,10 +50,10 @@ const NeuroFluxDisplay = (): React.ReactElement => {
|
||||
NeuroFlux Governor - Level {level}
|
||||
</Typography>
|
||||
<Typography color={Settings.theme.info}>
|
||||
{StaticAugmentations[AugmentationNames.NeuroFluxGovernor].stats}
|
||||
{StaticAugmentations[AugmentationName.NeuroFluxGovernor].stats}
|
||||
</Typography>
|
||||
<Typography color={Settings.theme.info}>
|
||||
The power of {AugmentationNames.NeuroFluxGovernor} increases with blood donations from players in real life.
|
||||
The power of {AugmentationName.NeuroFluxGovernor} increases with blood donations from players in real life.
|
||||
Learn more <Link onClick={openBloodDonation}>here</Link>
|
||||
</Typography>
|
||||
</Paper>
|
||||
@ -199,7 +199,7 @@ export function AugmentationsRoot(props: IProps): React.ReactElement {
|
||||
my: 1,
|
||||
display: "grid",
|
||||
gridTemplateColumns: `repeat(${
|
||||
+!!((Player.augmentations.find((e) => e.name === AugmentationNames.NeuroFluxGovernor)?.level ?? 0) > 0) +
|
||||
+!!((Player.augmentations.find((e) => e.name === AugmentationName.NeuroFluxGovernor)?.level ?? 0) > 0) +
|
||||
+!!(Player.entropy > 0)
|
||||
}, 1fr)`,
|
||||
gap: 1,
|
||||
|
@ -14,12 +14,12 @@ import { OwnedAugmentationsOrderSetting } from "../../Settings/SettingEnums";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { Player } from "@player";
|
||||
import { StaticAugmentations } from "../StaticAugmentations";
|
||||
import { AugmentationNames } from "../data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
|
||||
export function InstalledAugmentations(): React.ReactElement {
|
||||
const rerender = useRerender();
|
||||
const sourceAugs = Player.augmentations.slice().filter((aug) => aug.name !== AugmentationNames.NeuroFluxGovernor);
|
||||
const sourceAugs = Player.augmentations.slice().filter((aug) => aug.name !== AugmentationName.NeuroFluxGovernor);
|
||||
|
||||
const [selectedAug, setSelectedAug] = useState(sourceAugs[0]);
|
||||
|
||||
|
@ -10,10 +10,9 @@ import { Player } from "@player";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { formatMoney, formatReputation } from "../../ui/formatNumber";
|
||||
import { Augmentation } from "../Augmentation";
|
||||
import { AugmentationNames } from "../data/AugmentationNames";
|
||||
import { AugmentationName, FactionName } from "@enums";
|
||||
import { StaticAugmentations } from "../StaticAugmentations";
|
||||
import { PurchaseAugmentationModal } from "./PurchaseAugmentationModal";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
|
||||
interface IPreReqsProps {
|
||||
aug: Augmentation;
|
||||
@ -90,8 +89,8 @@ const Exclusive = (props: IExclusiveProps): React.ReactElement => {
|
||||
</li>
|
||||
)}
|
||||
{Player.canAccessGrafting() &&
|
||||
(!props.aug.isSpecial || props.aug.factions.includes(FactionNames.Bladeburners)) &&
|
||||
props.aug.name !== AugmentationNames.TheRedPill && (
|
||||
(!props.aug.isSpecial || props.aug.factions.includes(FactionName.Bladeburners)) &&
|
||||
props.aug.name !== AugmentationName.TheRedPill && (
|
||||
<li>
|
||||
<b>Grafting</b>
|
||||
</li>
|
||||
@ -210,7 +209,7 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
|
||||
<>
|
||||
<Typography variant="h5">
|
||||
{props.augName}
|
||||
{props.augName === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel()}`}
|
||||
{props.augName === AugmentationName.NeuroFluxGovernor && ` - Level ${aug.getLevel()}`}
|
||||
</Typography>
|
||||
<Typography>{description}</Typography>
|
||||
</>
|
||||
@ -227,7 +226,7 @@ export function PurchasableAugmentation(props: IPurchasableAugProps): React.Reac
|
||||
}}
|
||||
>
|
||||
{aug.name}
|
||||
{aug.name === AugmentationNames.NeuroFluxGovernor && ` - Level ${aug.getLevel()}`}
|
||||
{aug.name === AugmentationName.NeuroFluxGovernor && ` - Level ${aug.getLevel()}`}
|
||||
</Typography>
|
||||
</Tooltip>
|
||||
|
||||
|
@ -6,14 +6,14 @@ import { List, ListItemText, Paper, Tooltip, Typography } from "@mui/material";
|
||||
import * as React from "react";
|
||||
import { Player } from "@player";
|
||||
import { StaticAugmentations } from "../StaticAugmentations";
|
||||
import { AugmentationNames } from "../data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
|
||||
export function PurchasedAugmentations(): React.ReactElement {
|
||||
const augs: React.ReactElement[] = [];
|
||||
// Only render the last NeuroFlux (there are no findLastIndex btw)
|
||||
let nfgIndex = -1;
|
||||
for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {
|
||||
if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (Player.queuedAugmentations[i].name === AugmentationName.NeuroFluxGovernor) {
|
||||
nfgIndex = i;
|
||||
break;
|
||||
}
|
||||
@ -22,11 +22,11 @@ export function PurchasedAugmentations(): React.ReactElement {
|
||||
const ownedAug = Player.queuedAugmentations[i];
|
||||
let displayName = ownedAug.name;
|
||||
|
||||
if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;
|
||||
if (ownedAug.name === AugmentationName.NeuroFluxGovernor && i !== nfgIndex) continue;
|
||||
const aug = StaticAugmentations[ownedAug.name];
|
||||
|
||||
let level = null;
|
||||
if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {
|
||||
if (ownedAug.name === AugmentationName.NeuroFluxGovernor) {
|
||||
level = ownedAug.level;
|
||||
displayName += ` - Level ${level}`;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ export function SourceFileMinus1(): React.ReactElement {
|
||||
|
||||
<Typography>You have found the following exploits:</Typography>
|
||||
<Box mx={2}>
|
||||
{exploits.map((c: Exploit) => (
|
||||
{exploits.map((c) => (
|
||||
<Typography key={c}>* {ExploitName(c)}</Typography>
|
||||
))}
|
||||
</Box>
|
||||
|
@ -31,7 +31,7 @@ const safeGetSf = (sfNum: number): SourceFile | SfMinus1 | null => {
|
||||
You have found the following exploits:
|
||||
<br />
|
||||
<br />
|
||||
{Player.exploits.map((c: Exploit) => (
|
||||
{Player.exploits.map((c) => (
|
||||
<React.Fragment key={c}>
|
||||
* {ExploitName(c)}
|
||||
<br />
|
||||
|
@ -1,8 +1,7 @@
|
||||
import React from "react";
|
||||
import { Player } from "@player";
|
||||
import { BitNodeMultipliers, IBitNodeMultipliers } from "./BitNodeMultipliers";
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import { CityName } from "../Enums";
|
||||
import { CityName, FactionName } from "@enums";
|
||||
|
||||
class BitNode {
|
||||
// A short description, or tagline, about the BitNode
|
||||
@ -72,9 +71,8 @@ export function initBitNodes() {
|
||||
and savagery. The organized crime factions quickly rose to the top of the modern world.
|
||||
<br />
|
||||
<br />
|
||||
Certain Factions ({FactionNames.SlumSnakes}, {FactionNames.Tetrads}, {FactionNames.TheSyndicate},{" "}
|
||||
{FactionNames.TheDarkArmy}, {FactionNames.SpeakersForTheDead}, {FactionNames.NiteSec},{" "}
|
||||
{FactionNames.TheBlackHand}
|
||||
Certain Factions ({FactionName.SlumSnakes}, {FactionName.Tetrads}, {FactionName.TheSyndicate},{" "}
|
||||
{FactionName.TheDarkArmy}, {FactionName.SpeakersForTheDead}, {FactionName.NiteSec}, {FactionName.TheBlackHand}
|
||||
) give the player the ability to form and manage their own gangs. These gangs will earn the player money and
|
||||
reputation with the corresponding Faction
|
||||
<br />
|
||||
@ -188,23 +186,23 @@ export function initBitNodes() {
|
||||
BitNodes.BitNode6 = new BitNode(
|
||||
6,
|
||||
1,
|
||||
FactionNames.Bladeburners,
|
||||
FactionName.Bladeburners,
|
||||
"Like Tears in Rain",
|
||||
(
|
||||
<>
|
||||
In the middle of the 21st century, {FactionNames.OmniTekIncorporated} began designing and manufacturing advanced
|
||||
In the middle of the 21st century, {FactionName.OmniTekIncorporated} began designing and manufacturing advanced
|
||||
synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth
|
||||
generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was
|
||||
the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more
|
||||
intelligent than the humans that had created them.
|
||||
<br />
|
||||
<br />
|
||||
In this BitNode you will be able to access the {FactionNames.Bladeburners} Division at the NSA, which provides a
|
||||
In this BitNode you will be able to access the {FactionName.Bladeburners} Division at the NSA, which provides a
|
||||
new mechanic for progression.
|
||||
<br />
|
||||
<br />
|
||||
Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its
|
||||
level up to a maximum of 3. This Source-File allows you to access the NSA's {FactionNames.Bladeburners} Division
|
||||
level up to a maximum of 3. This Source-File allows you to access the NSA's {FactionName.Bladeburners} Division
|
||||
in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your
|
||||
combat stats by:
|
||||
<br />
|
||||
@ -220,24 +218,24 @@ export function initBitNodes() {
|
||||
BitNodes.BitNode7 = new BitNode(
|
||||
7,
|
||||
2,
|
||||
`${FactionNames.Bladeburners} 2079`,
|
||||
`${FactionName.Bladeburners} 2079`,
|
||||
"More human than humans",
|
||||
(
|
||||
<>
|
||||
In the middle of the 21st century, you were doing cutting-edge work at {FactionNames.OmniTekIncorporated} as
|
||||
part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major
|
||||
In the middle of the 21st century, you were doing cutting-edge work at {FactionName.OmniTekIncorporated} as part
|
||||
of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major
|
||||
technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing
|
||||
a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid
|
||||
models that were stronger, faster, and more intelligent than the humans that had created them.
|
||||
<br />
|
||||
<br />
|
||||
In this BitNode you will be able to access the {FactionNames.Bladeburners} API, which allows you to access{" "}
|
||||
{FactionNames.Bladeburners} functionality through Netscript.
|
||||
In this BitNode you will be able to access the {FactionName.Bladeburners} API, which allows you to access{" "}
|
||||
{FactionName.Bladeburners} functionality through Netscript.
|
||||
<br />
|
||||
<br />
|
||||
Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its
|
||||
level up to a maximum of 3. This Source-File allows you to access the {FactionNames.Bladeburners} Netscript API
|
||||
in other BitNodes. In addition, this Source-File will increase all of your {FactionNames.Bladeburners}{" "}
|
||||
level up to a maximum of 3. This Source-File allows you to access the {FactionName.Bladeburners} Netscript API
|
||||
in other BitNodes. In addition, this Source-File will increase all of your {FactionName.Bladeburners}{" "}
|
||||
multipliers by:
|
||||
<br />
|
||||
<br />
|
||||
@ -297,9 +295,9 @@ export function initBitNodes() {
|
||||
"Hacknet Unleashed",
|
||||
(
|
||||
<>
|
||||
When {FactionNames.FulcrumSecretTechnologies} released their open-source Linux distro Chapeau, it quickly became
|
||||
When {FactionName.FulcrumSecretTechnologies} released their open-source Linux distro Chapeau, it quickly became
|
||||
the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the
|
||||
Hacknet, a global, decentralized network used for nefarious purposes. {FactionNames.FulcrumSecretTechnologies}{" "}
|
||||
Hacknet, a global, decentralized network used for nefarious purposes. {FactionName.FulcrumSecretTechnologies}{" "}
|
||||
quickly abandoned the project and dissociated themselves from it.
|
||||
<br />
|
||||
<br />
|
||||
@ -431,7 +429,7 @@ export function initBitNodes() {
|
||||
(
|
||||
<>
|
||||
With the invention of Augmentations in the 2040s a religious group known as the{" "}
|
||||
{FactionNames.ChurchOfTheMachineGod} has rallied far more support than anyone would have hoped.
|
||||
{FactionName.ChurchOfTheMachineGod} has rallied far more support than anyone would have hoped.
|
||||
<br />
|
||||
<br />
|
||||
Their leader, Allison "Mother" Stanek is said to have created her own Augmentation whose power goes beyond any
|
||||
@ -439,7 +437,7 @@ export function initBitNodes() {
|
||||
<br />
|
||||
<br />
|
||||
Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade
|
||||
its level up to a maximum of 3. This Source-File lets the {FactionNames.ChurchOfTheMachineGod} appear in other
|
||||
its level up to a maximum of 3. This Source-File lets the {FactionName.ChurchOfTheMachineGod} appear in other
|
||||
BitNodes.
|
||||
<br />
|
||||
<br />
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { BlackOperation } from "./BlackOperation";
|
||||
import { BlackOperationNames } from "./data/BlackOperationNames";
|
||||
import { BlackOperationName } from "@enums";
|
||||
|
||||
export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
|
||||
(function () {
|
||||
BlackOperations[BlackOperationNames.OperationTyphoon] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationTyphoon,
|
||||
BlackOperations[BlackOperationName.OperationTyphoon] = new BlackOperation({
|
||||
name: BlackOperationName.OperationTyphoon,
|
||||
baseDifficulty: 2000,
|
||||
reqdRank: 2.5e3,
|
||||
rankGain: 50,
|
||||
@ -31,8 +31,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationZero] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationZero,
|
||||
BlackOperations[BlackOperationName.OperationZero] = new BlackOperation({
|
||||
name: BlackOperationName.OperationZero,
|
||||
baseDifficulty: 2500,
|
||||
reqdRank: 5e3,
|
||||
rankGain: 60,
|
||||
@ -58,8 +58,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isStealth: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationX] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationX,
|
||||
BlackOperations[BlackOperationName.OperationX] = new BlackOperation({
|
||||
name: BlackOperationName.OperationX,
|
||||
baseDifficulty: 3000,
|
||||
reqdRank: 7.5e3,
|
||||
rankGain: 75,
|
||||
@ -85,8 +85,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationTitan] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationTitan,
|
||||
BlackOperations[BlackOperationName.OperationTitan] = new BlackOperation({
|
||||
name: BlackOperationName.OperationTitan,
|
||||
baseDifficulty: 4000,
|
||||
reqdRank: 10e3,
|
||||
rankGain: 100,
|
||||
@ -112,8 +112,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationAres] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationAres,
|
||||
BlackOperations[BlackOperationName.OperationAres] = new BlackOperation({
|
||||
name: BlackOperationName.OperationAres,
|
||||
baseDifficulty: 5000,
|
||||
reqdRank: 12.5e3,
|
||||
rankGain: 125,
|
||||
@ -139,8 +139,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationArchangel] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationArchangel,
|
||||
BlackOperations[BlackOperationName.OperationArchangel] = new BlackOperation({
|
||||
name: BlackOperationName.OperationArchangel,
|
||||
baseDifficulty: 7500,
|
||||
reqdRank: 15e3,
|
||||
rankGain: 200,
|
||||
@ -166,8 +166,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationJuggernaut] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationJuggernaut,
|
||||
BlackOperations[BlackOperationName.OperationJuggernaut] = new BlackOperation({
|
||||
name: BlackOperationName.OperationJuggernaut,
|
||||
baseDifficulty: 10e3,
|
||||
reqdRank: 20e3,
|
||||
rankGain: 300,
|
||||
@ -193,8 +193,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationRedDragon] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationRedDragon,
|
||||
BlackOperations[BlackOperationName.OperationRedDragon] = new BlackOperation({
|
||||
name: BlackOperationName.OperationRedDragon,
|
||||
baseDifficulty: 12.5e3,
|
||||
reqdRank: 25e3,
|
||||
rankGain: 500,
|
||||
@ -220,8 +220,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationK] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationK,
|
||||
BlackOperations[BlackOperationName.OperationK] = new BlackOperation({
|
||||
name: BlackOperationName.OperationK,
|
||||
baseDifficulty: 15e3,
|
||||
reqdRank: 30e3,
|
||||
rankGain: 750,
|
||||
@ -247,8 +247,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationDeckard] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationDeckard,
|
||||
BlackOperations[BlackOperationName.OperationDeckard] = new BlackOperation({
|
||||
name: BlackOperationName.OperationDeckard,
|
||||
baseDifficulty: 20e3,
|
||||
reqdRank: 40e3,
|
||||
rankGain: 1e3,
|
||||
@ -274,8 +274,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationTyrell] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationTyrell,
|
||||
BlackOperations[BlackOperationName.OperationTyrell] = new BlackOperation({
|
||||
name: BlackOperationName.OperationTyrell,
|
||||
baseDifficulty: 25e3,
|
||||
reqdRank: 50e3,
|
||||
rankGain: 1.5e3,
|
||||
@ -301,8 +301,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationWallace] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationWallace,
|
||||
BlackOperations[BlackOperationName.OperationWallace] = new BlackOperation({
|
||||
name: BlackOperationName.OperationWallace,
|
||||
baseDifficulty: 30e3,
|
||||
reqdRank: 75e3,
|
||||
rankGain: 2e3,
|
||||
@ -328,8 +328,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationShoulderOfOrion] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationShoulderOfOrion,
|
||||
BlackOperations[BlackOperationName.OperationShoulderOfOrion] = new BlackOperation({
|
||||
name: BlackOperationName.OperationShoulderOfOrion,
|
||||
baseDifficulty: 35e3,
|
||||
reqdRank: 100e3,
|
||||
rankGain: 2.5e3,
|
||||
@ -355,8 +355,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isStealth: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationHyron] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationHyron,
|
||||
BlackOperations[BlackOperationName.OperationHyron] = new BlackOperation({
|
||||
name: BlackOperationName.OperationHyron,
|
||||
baseDifficulty: 40e3,
|
||||
reqdRank: 125e3,
|
||||
rankGain: 3e3,
|
||||
@ -382,8 +382,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationMorpheus] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationMorpheus,
|
||||
BlackOperations[BlackOperationName.OperationMorpheus] = new BlackOperation({
|
||||
name: BlackOperationName.OperationMorpheus,
|
||||
baseDifficulty: 45e3,
|
||||
reqdRank: 150e3,
|
||||
rankGain: 4e3,
|
||||
@ -409,8 +409,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isStealth: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationIonStorm] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationIonStorm,
|
||||
BlackOperations[BlackOperationName.OperationIonStorm] = new BlackOperation({
|
||||
name: BlackOperationName.OperationIonStorm,
|
||||
baseDifficulty: 50e3,
|
||||
reqdRank: 175e3,
|
||||
rankGain: 5e3,
|
||||
@ -436,8 +436,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationAnnihilus] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationAnnihilus,
|
||||
BlackOperations[BlackOperationName.OperationAnnihilus] = new BlackOperation({
|
||||
name: BlackOperationName.OperationAnnihilus,
|
||||
baseDifficulty: 55e3,
|
||||
reqdRank: 200e3,
|
||||
rankGain: 7.5e3,
|
||||
@ -463,8 +463,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationUltron] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationUltron,
|
||||
BlackOperations[BlackOperationName.OperationUltron] = new BlackOperation({
|
||||
name: BlackOperationName.OperationUltron,
|
||||
baseDifficulty: 60e3,
|
||||
reqdRank: 250e3,
|
||||
rankGain: 10e3,
|
||||
@ -490,8 +490,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
},
|
||||
isKill: true,
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationCenturion] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationCenturion,
|
||||
BlackOperations[BlackOperationName.OperationCenturion] = new BlackOperation({
|
||||
name: BlackOperationName.OperationCenturion,
|
||||
baseDifficulty: 70e3,
|
||||
reqdRank: 300e3,
|
||||
rankGain: 15e3,
|
||||
@ -516,8 +516,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
int: 0.75,
|
||||
},
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationVindictus] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationVindictus,
|
||||
BlackOperations[BlackOperationName.OperationVindictus] = new BlackOperation({
|
||||
name: BlackOperationName.OperationVindictus,
|
||||
baseDifficulty: 75e3,
|
||||
reqdRank: 350e3,
|
||||
rankGain: 20e3,
|
||||
@ -542,8 +542,8 @@ export const BlackOperations: Record<string, BlackOperation> = {};
|
||||
int: 0.75,
|
||||
},
|
||||
});
|
||||
BlackOperations[BlackOperationNames.OperationDaedalus] = new BlackOperation({
|
||||
name: BlackOperationNames.OperationDaedalus,
|
||||
BlackOperations[BlackOperationName.OperationDaedalus] = new BlackOperation({
|
||||
name: BlackOperationName.OperationDaedalus,
|
||||
baseDifficulty: 80e3,
|
||||
reqdRank: 400e3,
|
||||
rankGain: 40e3,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { AugmentationName, CityName, FactionName } from "@enums";
|
||||
import { constructorsForReviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
|
||||
import { ActionIdentifier } from "./ActionIdentifier";
|
||||
import { ActionTypes } from "./data/ActionTypes";
|
||||
@ -26,17 +27,14 @@ import { Factions, factionExists } from "../Faction/Factions";
|
||||
import { calculateHospitalizationCost } from "../Hospital/Hospital";
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { Settings } from "../Settings/Settings";
|
||||
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
||||
import { getTimestamp } from "../utils/helpers/getTimestamp";
|
||||
import { joinFaction } from "../Faction/FactionHelpers";
|
||||
import { WorkerScript } from "../Netscript/WorkerScript";
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import { KEY } from "../utils/helpers/keyCodes";
|
||||
import { isSleeveInfiltrateWork } from "../PersonObjects/Sleeve/Work/SleeveInfiltrateWork";
|
||||
import { isSleeveSupportWork } from "../PersonObjects/Sleeve/Work/SleeveSupportWork";
|
||||
import { WorkStats, newWorkStats } from "../Work/WorkStats";
|
||||
import { CityName } from "../Enums";
|
||||
import { getRandomMember } from "../utils/helpers/enum";
|
||||
import { getEnumHelper } from "../utils/EnumHelper";
|
||||
import { createEnumKeyedRecord } from "../Types/Record";
|
||||
|
||||
export interface BlackOpsAttempt {
|
||||
@ -293,7 +291,7 @@ export class Bladeburner {
|
||||
|
||||
prestige(): void {
|
||||
this.resetAction();
|
||||
const bladeburnerFac = Factions[FactionNames.Bladeburners];
|
||||
const bladeburnerFac = Factions[FactionName.Bladeburners];
|
||||
if (this.rank >= BladeburnerConstants.RankNeededForFaction) {
|
||||
joinFaction(bladeburnerFac);
|
||||
}
|
||||
@ -849,8 +847,9 @@ export class Bladeburner {
|
||||
}
|
||||
|
||||
triggerMigration(sourceCityName: CityName): void {
|
||||
let destCityName = getRandomMember(CityName);
|
||||
while (destCityName === sourceCityName) destCityName = getRandomMember(CityName);
|
||||
const cityHelper = getEnumHelper("CityName");
|
||||
let destCityName = cityHelper.random();
|
||||
while (destCityName === sourceCityName) destCityName = cityHelper.random();
|
||||
|
||||
const destCity = this.cities[destCityName];
|
||||
const sourceCity = this.cities[sourceCityName];
|
||||
@ -883,13 +882,14 @@ export class Bladeburner {
|
||||
|
||||
randomEvent(): void {
|
||||
const chance = Math.random();
|
||||
const cityHelper = getEnumHelper("CityName");
|
||||
|
||||
// Choose random source/destination city for events
|
||||
const sourceCityName = getRandomMember(CityName);
|
||||
const sourceCityName = cityHelper.random();
|
||||
const sourceCity = this.cities[sourceCityName];
|
||||
|
||||
let destCityName = getRandomMember(CityName);
|
||||
while (destCityName === sourceCityName) destCityName = getRandomMember(CityName);
|
||||
let destCityName = cityHelper.random();
|
||||
while (destCityName === sourceCityName) destCityName = cityHelper.random();
|
||||
const destCity = this.cities[destCityName];
|
||||
|
||||
if (chance <= 0.05) {
|
||||
@ -1607,12 +1607,12 @@ export class Bladeburner {
|
||||
}
|
||||
this.maxRank = Math.max(this.rank, this.maxRank);
|
||||
|
||||
const bladeburnersFactionName = FactionNames.Bladeburners;
|
||||
const bladeburnersFactionName = FactionName.Bladeburners;
|
||||
if (factionExists(bladeburnersFactionName)) {
|
||||
const bladeburnerFac = Factions[bladeburnersFactionName];
|
||||
if (!bladeburnerFac) {
|
||||
throw new Error(
|
||||
`Could not properly get ${FactionNames.Bladeburners} Faction object in ${FactionNames.Bladeburners} UI Overview Faction button`,
|
||||
`Could not properly get ${FactionName.Bladeburners} Faction object in ${FactionName.Bladeburners} UI Overview Faction button`,
|
||||
);
|
||||
}
|
||||
if (bladeburnerFac.isMember) {
|
||||
@ -1959,7 +1959,7 @@ export class Bladeburner {
|
||||
if (!Router.isInitialized) return;
|
||||
|
||||
// If the Player starts doing some other actions, set action to idle and alert
|
||||
if (!Player.hasAugmentation(AugmentationNames.BladesSimulacrum, true) && Player.currentWork) {
|
||||
if (!Player.hasAugmentation(AugmentationName.BladesSimulacrum, true) && Player.currentWork) {
|
||||
if (this.action.type !== ActionTypes.Idle) {
|
||||
let msg = "Your Bladeburner action was cancelled because you started doing something else.";
|
||||
if (this.automateEnabled) {
|
||||
@ -2360,12 +2360,12 @@ export class Bladeburner {
|
||||
}
|
||||
|
||||
joinBladeburnerFactionNetscriptFn(workerScript: WorkerScript): boolean {
|
||||
const bladeburnerFac = Factions[FactionNames.Bladeburners];
|
||||
const bladeburnerFac = Factions[FactionName.Bladeburners];
|
||||
if (bladeburnerFac.isMember) {
|
||||
return true;
|
||||
} else if (this.rank >= BladeburnerConstants.RankNeededForFaction) {
|
||||
joinFaction(bladeburnerFac);
|
||||
workerScript.log("bladeburner.joinBladeburnerFaction", () => `Joined ${FactionNames.Bladeburners} faction.`);
|
||||
workerScript.log("bladeburner.joinBladeburnerFaction", () => `Joined ${FactionName.Bladeburners} faction.`);
|
||||
return true;
|
||||
} else {
|
||||
workerScript.log(
|
||||
|
@ -2,7 +2,7 @@ import { BladeburnerConstants } from "./data/Constants";
|
||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { addOffset } from "../utils/helpers/addOffset";
|
||||
import { CityName } from "../Enums";
|
||||
import { CityName } from "@enums";
|
||||
|
||||
interface IChangePopulationByCountParams {
|
||||
/** How much the estimate should change by. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
export enum BlackOperationNames {
|
||||
export enum BlackOperationName {
|
||||
OperationTyphoon = "Operation Typhoon",
|
||||
OperationZero = "Operation Zero",
|
||||
OperationX = "Operation X",
|
@ -1,41 +1,39 @@
|
||||
import React from "react";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { CityName } from "../../Enums";
|
||||
import { BlackOperationNames } from "./BlackOperationNames";
|
||||
import { BlackOperationName, CityName, FactionName } from "@enums";
|
||||
|
||||
interface IBlackOp {
|
||||
desc: JSX.Element;
|
||||
}
|
||||
|
||||
export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
[BlackOperationNames.OperationTyphoon]: {
|
||||
[BlackOperationName.OperationTyphoon]: {
|
||||
desc: (
|
||||
<>
|
||||
Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that
|
||||
Zenyatta, along with the rest of the PMC, is a Synthoid.
|
||||
<br />
|
||||
<br />
|
||||
The goal of {BlackOperationNames.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means
|
||||
The goal of {BlackOperationName.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means
|
||||
necessary. After the task is completed, the actions must be covered up from the general public.
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
[BlackOperationNames.OperationZero]: {
|
||||
[BlackOperationName.OperationZero]: {
|
||||
desc: (
|
||||
<>
|
||||
AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a
|
||||
supporter of Synthoid rights. He must be removed.
|
||||
<br />
|
||||
<br />
|
||||
The goal of {BlackOperationNames.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating
|
||||
The goal of {BlackOperationName.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating
|
||||
evidence or information against Watataki that will cause him to be removed from his position at AeroCorp.
|
||||
Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced
|
||||
security measures in the world.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationX]: {
|
||||
[BlackOperationName.OperationX]: {
|
||||
desc: (
|
||||
<>
|
||||
We have recently discovered an underground publication group called Samizdat. Even though most of their
|
||||
@ -50,7 +48,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationTitan]: {
|
||||
[BlackOperationName.OperationTitan]: {
|
||||
desc: (
|
||||
<>
|
||||
Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we
|
||||
@ -65,7 +63,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationAres]: {
|
||||
[BlackOperationName.OperationAres]: {
|
||||
desc: (
|
||||
<>
|
||||
One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai
|
||||
@ -77,7 +75,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationArchangel]: {
|
||||
[BlackOperationName.OperationArchangel]: {
|
||||
desc: (
|
||||
<>
|
||||
Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI
|
||||
@ -90,7 +88,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationJuggernaut]: {
|
||||
[BlackOperationName.OperationJuggernaut]: {
|
||||
desc: (
|
||||
<>
|
||||
The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls
|
||||
@ -104,20 +102,20 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationRedDragon]: {
|
||||
[BlackOperationName.OperationRedDragon]: {
|
||||
desc: (
|
||||
<>
|
||||
The {FactionNames.Tetrads} criminal organization is suspected of reverse-engineering the MK-VI Synthoid design.
|
||||
The {FactionName.Tetrads} criminal organization is suspected of reverse-engineering the MK-VI Synthoid design.
|
||||
We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in
|
||||
order to bolster their criminal activities.
|
||||
<br />
|
||||
<br />
|
||||
Your task is to infiltrate and destroy the {FactionNames.Tetrads}' base of operations in Los Angeles.
|
||||
Your task is to infiltrate and destroy the {FactionName.Tetrads}' base of operations in Los Angeles.
|
||||
Intelligence tells us that their base houses one of their Synthoid manufacturing units.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationK]: {
|
||||
[BlackOperationName.OperationK]: {
|
||||
desc: (
|
||||
<>
|
||||
CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology.
|
||||
@ -133,52 +131,51 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationDeckard]: {
|
||||
[BlackOperationName.OperationDeckard]: {
|
||||
desc: (
|
||||
<>
|
||||
Despite your success in eliminating VitaLife's new android-replicating technology in{" "}
|
||||
{BlackOperationNames.OperationK}, we've discovered that a small group of MK-VI Synthoids were able to make off
|
||||
{BlackOperationName.OperationK}, we've discovered that a small group of MK-VI Synthoids were able to make off
|
||||
with the schematics and design of the technology before the Operation. It is almost a certainty that these
|
||||
Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.
|
||||
<br />
|
||||
<br />
|
||||
The goal of {BlackOperationNames.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need
|
||||
The goal of {BlackOperationName.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need
|
||||
to tell you how critical this mission is.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationTyrell]: {
|
||||
[BlackOperationName.OperationTyrell]: {
|
||||
desc: (
|
||||
<>
|
||||
A week ago {FactionNames.BladeIndustries} reported a small break-in at one of their {CityName.Aevum}{" "}
|
||||
Augmentation storage facilities. We figured out that {FactionNames.TheDarkArmy} was behind the heist, and didn't
|
||||
think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that
|
||||
break-in group.
|
||||
A week ago {FactionName.BladeIndustries} reported a small break-in at one of their {CityName.Aevum} Augmentation
|
||||
storage facilities. We figured out that {FactionName.TheDarkArmy} was behind the heist, and didn't think any
|
||||
more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.
|
||||
<br />
|
||||
<br />
|
||||
We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt
|
||||
down associated {FactionNames.TheDarkArmy} members and eliminate them.
|
||||
down associated {FactionName.TheDarkArmy} members and eliminate them.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationWallace]: {
|
||||
[BlackOperationName.OperationWallace]: {
|
||||
desc: (
|
||||
<>
|
||||
Based on information gathered from {BlackOperationNames.OperationTyrell}, we've discovered that{" "}
|
||||
{FactionNames.TheDarkArmy} was well aware that there were Synthoids amongst their ranks. Even worse, we believe
|
||||
that {FactionNames.TheDarkArmy} is working together with other criminal organizations such as{" "}
|
||||
{FactionNames.TheSyndicate} and that they are planning some sort of large-scale takeover of multiple major
|
||||
Based on information gathered from {BlackOperationName.OperationTyrell}, we've discovered that{" "}
|
||||
{FactionName.TheDarkArmy} was well aware that there were Synthoids amongst their ranks. Even worse, we believe
|
||||
that {FactionName.TheDarkArmy} is working together with other criminal organizations such as{" "}
|
||||
{FactionName.TheSyndicate} and that they are planning some sort of large-scale takeover of multiple major
|
||||
cities, most notably {CityName.Aevum}. We suspect that Synthoids have infiltrated the ranks of these criminal
|
||||
factions and are trying to stage another Synthoid uprising.
|
||||
<br />
|
||||
<br />
|
||||
The best way to deal with this is to prevent it before it even happens. The goal of{" "}
|
||||
{BlackOperationNames.OperationWallace} is to destroy {FactionNames.TheDarkArmy} and Syndicate factions in{" "}
|
||||
{BlackOperationName.OperationWallace} is to destroy {FactionName.TheDarkArmy} and Syndicate factions in{" "}
|
||||
{CityName.Aevum} immediately. Leave no survivors.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationShoulderOfOrion]: {
|
||||
[BlackOperationName.OperationShoulderOfOrion]: {
|
||||
desc: (
|
||||
<>
|
||||
China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using
|
||||
@ -191,10 +188,10 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationHyron]: {
|
||||
[BlackOperationName.OperationHyron]: {
|
||||
desc: (
|
||||
<>
|
||||
Our intelligence tells us that {FactionNames.FulcrumSecretTechnologies} is developing a quantum supercomputer
|
||||
Our intelligence tells us that {FactionName.FulcrumSecretTechnologies} is developing a quantum supercomputer
|
||||
using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data
|
||||
and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of
|
||||
organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.
|
||||
@ -203,13 +200,13 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.
|
||||
<br />
|
||||
<br />
|
||||
The research for this project is being conducted at one of {FactionNames.FulcrumSecretTechnologies} secret
|
||||
The research for this project is being conducted at one of {FactionName.FulcrumSecretTechnologies} secret
|
||||
facilities in {CityName.Aevum}, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work,
|
||||
and then find and kill the project lead.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationMorpheus]: {
|
||||
[BlackOperationName.OperationMorpheus]: {
|
||||
desc: (
|
||||
<>
|
||||
DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the
|
||||
@ -222,7 +219,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationIonStorm]: {
|
||||
[BlackOperationName.OperationIonStorm]: {
|
||||
desc: (
|
||||
<>
|
||||
Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the{" "}
|
||||
@ -235,26 +232,26 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationAnnihilus]: {
|
||||
[BlackOperationName.OperationAnnihilus]: {
|
||||
desc: (
|
||||
<>
|
||||
Our superiors have ordered us to eradicate everything and everyone in an underground facility located in{" "}
|
||||
{CityName.Aevum}. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist
|
||||
organization called '{FactionNames.TheCovenant}'. We have no prior intelligence about this organization, so you
|
||||
organization called '{FactionName.TheCovenant}'. We have no prior intelligence about this organization, so you
|
||||
are going in blind.
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationUltron]: {
|
||||
[BlackOperationName.OperationUltron]: {
|
||||
desc: (
|
||||
<>
|
||||
{FactionNames.OmniTekIncorporated}, the original designer and manufacturer of Synthoids, has notified us of a
|
||||
{FactionName.OmniTekIncorporated}, the original designer and manufacturer of Synthoids, has notified us of a
|
||||
malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized
|
||||
and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue
|
||||
ones from the Uprising.
|
||||
<br />
|
||||
<br />
|
||||
{FactionNames.OmniTekIncorporated} has also told us they believe someone has triggered this malfunction in a
|
||||
{FactionName.OmniTekIncorporated} has also told us they believe someone has triggered this malfunction in a
|
||||
large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in{" "}
|
||||
{CityName.Volhaven} to form a terrorist group called Ultron.
|
||||
<br />
|
||||
@ -267,7 +264,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationCenturion]: {
|
||||
[BlackOperationName.OperationCenturion]: {
|
||||
desc: (
|
||||
<>
|
||||
{"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)"}
|
||||
@ -285,7 +282,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationVindictus]: {
|
||||
[BlackOperationName.OperationVindictus]: {
|
||||
desc: (
|
||||
<>
|
||||
{"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)"}
|
||||
@ -299,7 +296,7 @@ export const BlackOperations: Record<string, IBlackOp | undefined> = {
|
||||
</>
|
||||
),
|
||||
},
|
||||
[BlackOperationNames.OperationDaedalus]: {
|
||||
[BlackOperationName.OperationDaedalus]: {
|
||||
desc: <> Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.</>,
|
||||
},
|
||||
};
|
||||
|
@ -1,11 +1,9 @@
|
||||
import * as React from "react";
|
||||
import { Button, Typography } from "@mui/material";
|
||||
import { BlackOperationName, FactionName } from "@enums";
|
||||
import { BlackOpList } from "./BlackOpList";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { BlackOperationNames } from "../data/BlackOperationNames";
|
||||
import { Button } from "@mui/material";
|
||||
import { CorruptableText } from "../../ui/React/CorruptableText";
|
||||
|
||||
interface IProps {
|
||||
@ -21,7 +19,7 @@ export function BlackOpPage(props: IProps): React.ReactElement {
|
||||
<br />
|
||||
<br />
|
||||
<b>
|
||||
Your ultimate goal to climb through the ranks of {FactionNames.Bladeburners} is to complete all of the Black
|
||||
Your ultimate goal to climb through the ranks of {FactionName.Bladeburners} is to complete all of the Black
|
||||
Ops.
|
||||
</b>
|
||||
<br />
|
||||
@ -29,7 +27,7 @@ export function BlackOpPage(props: IProps): React.ReactElement {
|
||||
Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank
|
||||
losses.
|
||||
</Typography>
|
||||
{props.bladeburner.blackops[BlackOperationNames.OperationDaedalus] ? (
|
||||
{props.bladeburner.blackops[BlackOperationName.OperationDaedalus] ? (
|
||||
<Button sx={{ my: 1, p: 1 }} onClick={() => Router.toBitVerse(false, false)}>
|
||||
<CorruptableText content="Destroy w0rld_d34mon"></CorruptableText>
|
||||
</Button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { Page } from "../../ui/Router";
|
||||
import { CinematicText } from "../../ui/React/CinematicText";
|
||||
@ -9,14 +9,14 @@ export function BladeburnerCinematic(): React.ReactElement {
|
||||
return (
|
||||
<CinematicText
|
||||
lines={[
|
||||
`In the middle of the 21st century, ${FactionNames.OmniTekIncorporated} advanced robot evolution `,
|
||||
`In the middle of the 21st century, ${FactionName.OmniTekIncorporated} advanced robot evolution `,
|
||||
"with their Synthoids (synthetic androids), a being virtually identical to a human.",
|
||||
"------",
|
||||
"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more ",
|
||||
"intelligent than humans. Many argued that the MK-VI Synthoids were the first ",
|
||||
"example of sentient AI.",
|
||||
"------",
|
||||
`Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into ${FactionNames.OmniTekIncorporated} and `,
|
||||
`Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into ${FactionName.OmniTekIncorporated} and `,
|
||||
"uploaded a rogue AI into their Synthoid manufacturing facilities.",
|
||||
"------",
|
||||
"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating ",
|
||||
@ -28,13 +28,13 @@ export function BladeburnerCinematic(): React.ReactElement {
|
||||
"------",
|
||||
"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were ",
|
||||
"found and destroyed, and that many of them are blending in as normal humans in society today. ",
|
||||
`As a result, many nations have created ${FactionNames.Bladeburners} divisions, special units that are tasked with `,
|
||||
`As a result, many nations have created ${FactionName.Bladeburners} divisions, special units that are tasked with `,
|
||||
"investigating and dealing with Synthoid threats.",
|
||||
]}
|
||||
onDone={() => {
|
||||
Router.toPage(Page.Terminal);
|
||||
dialogBoxCreate(
|
||||
`Visit the National Security Agency (NSA) to apply for their ${FactionNames.Bladeburners} ` +
|
||||
`Visit the National Security Agency (NSA) to apply for their ${FactionName.Bladeburners} ` +
|
||||
"division! You will need 100 of each combat stat before doing this.",
|
||||
);
|
||||
}}
|
||||
|
@ -4,7 +4,7 @@ import { Bladeburner } from "../Bladeburner";
|
||||
import { BlackOperation } from "../BlackOperation";
|
||||
import { Player } from "@player";
|
||||
import Button from "@mui/material/Button";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { ActionIdentifier } from "../ActionIdentifier";
|
||||
|
||||
interface IProps {
|
||||
@ -33,7 +33,7 @@ export function StartButton(props: IProps): React.ReactElement {
|
||||
if (disabled) return;
|
||||
props.bladeburner.action.type = props.type;
|
||||
props.bladeburner.action.name = props.name;
|
||||
if (!Player.hasAugmentation(AugmentationNames.BladesSimulacrum, true)) Player.finishWork(true);
|
||||
if (!Player.hasAugmentation(AugmentationName.BladesSimulacrum, true)) Player.finishWork(true);
|
||||
props.bladeburner.startAction(props.bladeburner.action);
|
||||
props.rerender();
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Box, Button, Paper, Tooltip, Typography } from "@mui/material";
|
||||
import { Player } from "@player";
|
||||
import { FactionName } from "@enums";
|
||||
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
|
||||
import { BladeburnerConstants } from "../data/Constants";
|
||||
import { Player } from "@player";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { formatNumberNoSuffix, formatPopulation, formatBigNumber } from "../../ui/formatNumber";
|
||||
import { Factions } from "../../Faction/Factions";
|
||||
@ -10,12 +12,6 @@ import { joinFaction } from "../../Faction/FactionHelpers";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import { TravelModal } from "./TravelModal";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import Box from "@mui/material/Box";
|
||||
import Button from "@mui/material/Button";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
|
||||
interface IProps {
|
||||
bladeburner: Bladeburner;
|
||||
@ -33,7 +29,7 @@ export function Stats(props: IProps): React.ReactElement {
|
||||
|
||||
function openFaction(): void {
|
||||
if (!inFaction) return;
|
||||
const faction = Factions[FactionNames.Bladeburners];
|
||||
const faction = Factions[FactionName.Bladeburners];
|
||||
if (!faction.isMember) {
|
||||
joinFaction(faction);
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
import React from "react";
|
||||
import { Button, Typography } from "@mui/material";
|
||||
import { CityName } from "@enums";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { WorldMap } from "../../ui/React/WorldMap";
|
||||
import { Modal } from "../../ui/React/Modal";
|
||||
import { CityName } from "../../Enums";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Button from "@mui/material/Button";
|
||||
|
||||
interface IProps {
|
||||
bladeburner: Bladeburner;
|
||||
|
@ -1,3 +1,4 @@
|
||||
// No enum helper needed, does not need to be in an Enums.ts
|
||||
// Enum values are lowercased to match css classes
|
||||
export enum Suit {
|
||||
Clubs = "clubs",
|
||||
|
@ -55,6 +55,7 @@ for (const md of codingContractTypesMetadata) {
|
||||
);
|
||||
}
|
||||
|
||||
// Numeric enum
|
||||
/** Enum representing the different types of rewards a Coding Contract can give */
|
||||
export enum CodingContractRewardType {
|
||||
FactionReputation,
|
||||
@ -63,6 +64,7 @@ export enum CodingContractRewardType {
|
||||
Money, // This must always be the last reward type
|
||||
}
|
||||
|
||||
// Numeric enum
|
||||
/** Enum representing the result when trying to solve the Contract */
|
||||
export enum CodingContractResult {
|
||||
Success,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Person as IPerson } from "@nsdefs";
|
||||
import { CONSTANTS } from "../Constants";
|
||||
import * as names from "./data/JobTracks";
|
||||
import { JobName } from "../Enums";
|
||||
import { JobName } from "@enums";
|
||||
|
||||
export interface IConstructorParams {
|
||||
name: JobName;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import * as posNames from "./JobTracks";
|
||||
import { IConstructorParams } from "../Company";
|
||||
|
||||
import { LocationName } from "../../Enums";
|
||||
import { LocationName } from "@enums";
|
||||
|
||||
// These are grossly typed, need to address
|
||||
// Create Objects containing Company Positions by category
|
||||
// Will help in metadata construction later
|
||||
const AllSoftwarePositions: Record<string, boolean> = {};
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { JobName } from "../../Enums";
|
||||
import { JobName } from "@enums";
|
||||
|
||||
// This entire file can be reworked to
|
||||
export const SoftwareCompanyPositions: JobName[] = [
|
||||
JobName.software0,
|
||||
JobName.software1,
|
||||
|
@ -12,10 +12,10 @@ import { OfficeSpace } from "./OfficeSpace";
|
||||
import { Material } from "./Material";
|
||||
import { Product } from "./Product";
|
||||
import { Warehouse } from "./Warehouse";
|
||||
import { IndustryType } from "./data/Enums";
|
||||
import { IndustryType } from "@enums";
|
||||
import { ResearchMap } from "./ResearchMap";
|
||||
import { isRelevantMaterial } from "./ui/Helpers";
|
||||
import { CityName } from "../Enums";
|
||||
import { CityName } from "@enums";
|
||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||
import { getRecordValues } from "../Types/Record";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { Player } from "@player";
|
||||
import { CorpUnlockName, CorpUpgradeName, LiteratureName } from "@enums";
|
||||
import { CorporationState } from "./CorporationState";
|
||||
import { CorpUnlocks } from "./data/CorporationUnlocks";
|
||||
import { CorpUpgrades } from "./data/CorporationUpgrades";
|
||||
@ -6,15 +8,12 @@ import { Division } from "./Division";
|
||||
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
import { showLiterature } from "../Literature/LiteratureHelpers";
|
||||
import { LiteratureName } from "../Literature/data/LiteratureNames";
|
||||
import { Player } from "@player";
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { constructorsForReviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
|
||||
import { CorpStateName } from "@nsdefs";
|
||||
import { calculateUpgradeCost } from "./helpers";
|
||||
import { JSONMap, JSONSet } from "../Types/Jsonable";
|
||||
import { CorpUnlockName, CorpUpgradeName } from "./data/Enums";
|
||||
import { formatMoney } from "../ui/formatNumber";
|
||||
import { isPositiveInteger } from "../types";
|
||||
import { createEnumKeyedRecord, getRecordValues } from "../Types/Record";
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { CorpMaterialName, CorpResearchName, CorpStateName } from "@nsdefs";
|
||||
import { CityName, CorpEmployeeJob, IndustryType } from "@enums";
|
||||
import { constructorsForReviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
|
||||
import { CityName } from "../Enums";
|
||||
import { IndustryResearchTrees, IndustriesData } from "./data/IndustryData";
|
||||
import * as corpConstants from "./data/Constants";
|
||||
import { CorpEmployeeJob, IndustryType } from "./data/Enums";
|
||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||
import { calculateEffectWithFactors } from "../utils/calculateEffectWithFactors";
|
||||
import { OfficeSpace } from "./OfficeSpace";
|
||||
@ -12,7 +12,6 @@ import { isString } from "../utils/helpers/string";
|
||||
import { MaterialInfo } from "./MaterialInfo";
|
||||
import { Warehouse } from "./Warehouse";
|
||||
import { Corporation } from "./Corporation";
|
||||
import { CorpMaterialName, CorpResearchName, CorpStateName } from "@nsdefs";
|
||||
import { JSONMap, JSONSet } from "../Types/Jsonable";
|
||||
import { PartialRecord, getRecordEntries, getRecordKeys, getRecordValues } from "../Types/Record";
|
||||
import { Material } from "./Material";
|
||||
|
111
src/Corporation/Enums.ts
Normal file
111
src/Corporation/Enums.ts
Normal file
@ -0,0 +1,111 @@
|
||||
import { Member } from "src/types";
|
||||
|
||||
export enum IndustryType {
|
||||
Water = "Water Utilities",
|
||||
Spring = "Spring Water",
|
||||
Agriculture = "Agriculture",
|
||||
Fishing = "Fishing",
|
||||
Mining = "Mining",
|
||||
Refinery = "Refinery",
|
||||
Restaurant = "Restaurant",
|
||||
Tobacco = "Tobacco",
|
||||
Chemical = "Chemical",
|
||||
Pharmaceutical = "Pharmaceutical",
|
||||
Computers = "Computer Hardware",
|
||||
Robotics = "Robotics",
|
||||
Software = "Software",
|
||||
Healthcare = "Healthcare",
|
||||
RealEstate = "Real Estate",
|
||||
}
|
||||
|
||||
export enum CorpEmployeeJob {
|
||||
Operations = "Operations",
|
||||
Engineer = "Engineer",
|
||||
Business = "Business",
|
||||
Management = "Management",
|
||||
RandD = "Research & Development",
|
||||
Intern = "Intern",
|
||||
Unassigned = "Unassigned",
|
||||
}
|
||||
|
||||
export enum CorpUnlockName {
|
||||
Export = "Export",
|
||||
SmartSupply = "Smart Supply",
|
||||
MarketResearchDemand = "Market Research - Demand",
|
||||
MarketDataCompetition = "Market Data - Competition",
|
||||
VeChain = "VeChain",
|
||||
ShadyAccounting = "Shady Accounting",
|
||||
GovernmentPartnership = "Government Partnership",
|
||||
WarehouseAPI = "Warehouse API",
|
||||
OfficeAPI = "Office API",
|
||||
}
|
||||
|
||||
export enum CorpUpgradeName {
|
||||
SmartFactories = "Smart Factories",
|
||||
SmartStorage = "Smart Storage",
|
||||
DreamSense = "DreamSense",
|
||||
WilsonAnalytics = "Wilson Analytics",
|
||||
NuoptimalNootropicInjectorImplants = "Nuoptimal Nootropic Injector Implants",
|
||||
SpeechProcessorImplants = "Speech Processor Implants",
|
||||
NeuralAccelerators = "Neural Accelerators",
|
||||
FocusWires = "FocusWires",
|
||||
ABCSalesBots = "ABC SalesBots",
|
||||
ProjectInsight = "Project Insight",
|
||||
}
|
||||
|
||||
// As const + type for now, convert to enum later
|
||||
export const CorpMaterialName = {
|
||||
Water: "Water",
|
||||
Ore: "Ore",
|
||||
Minerals: "Minerals",
|
||||
Food: "Food",
|
||||
Plants: "Plants",
|
||||
Metal: "Metal",
|
||||
Hardware: "Hardware",
|
||||
Chemicals: "Chemicals",
|
||||
Drugs: "Drugs",
|
||||
Robots: "Robots",
|
||||
AiCores: "AI Cores",
|
||||
RealEstate: "Real Estate",
|
||||
} as const;
|
||||
export type CorpMaterialName = Member<typeof CorpMaterialName>;
|
||||
|
||||
// As const + type for now, convert to enum later
|
||||
export const SmartSupplyOption = {
|
||||
leftovers: "leftovers",
|
||||
imports: "imports",
|
||||
none: "none",
|
||||
} as const;
|
||||
export type SmartSupplyOption = Member<typeof SmartSupplyOption>;
|
||||
|
||||
// As const + type for now, convert to enum later
|
||||
export const CorpBaseResearchName = {
|
||||
Lab: "Hi-Tech R&D Laboratory",
|
||||
AutoBrew: "AutoBrew",
|
||||
AutoParty: "AutoPartyManager",
|
||||
AutoDrug: "Automatic Drug Administration",
|
||||
CPH4Inject: "CPH4 Injections",
|
||||
Drones: "Drones",
|
||||
DronesAssembly: "Drones - Assembly",
|
||||
DronesTransport: "Drones - Transport",
|
||||
GoJuice: "Go-Juice",
|
||||
RecruitHR: "HRBuddy-Recruitment",
|
||||
TrainingHR: "HRBuddy-Training",
|
||||
MarketTa1: "Market-TA.I",
|
||||
MarketTa2: "Market-TA.II",
|
||||
Overclock: "Overclock",
|
||||
SelfCorrectAssemblers: "Self-Correcting Assemblers",
|
||||
Stimu: "Sti.mu",
|
||||
} as const;
|
||||
export type CorpBaseResearchName = Member<typeof CorpBaseResearchName>;
|
||||
|
||||
export const CorpProductResearchName = {
|
||||
Capacity1: "uPgrade: Capacity.I",
|
||||
Capacity2: "uPgrade: Capacity.II",
|
||||
Dashboard: "uPgrade: Dashboard",
|
||||
Fulcrum: "uPgrade: Fulcrum",
|
||||
} as const;
|
||||
export type CorpProductResearchName = Member<typeof CorpProductResearchName>;
|
||||
|
||||
export const CorpResearchName = { ...CorpProductResearchName, ...CorpBaseResearchName };
|
||||
export type CorpResearchName = Member<typeof CorpResearchName>;
|
@ -1,4 +1,4 @@
|
||||
import { CityName } from "../Enums";
|
||||
import type { CityName } from "@enums";
|
||||
|
||||
export interface Export {
|
||||
division: string;
|
||||
|
@ -1,10 +1,9 @@
|
||||
import { CorpEmployeeJob } from "./data/Enums";
|
||||
import { CityName, CorpEmployeeJob } from "@enums";
|
||||
import * as corpConstants from "./data/Constants";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { Division } from "./Division";
|
||||
import { Corporation } from "./Corporation";
|
||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||
import { CityName } from "../Enums";
|
||||
import { createEnumKeyedRecord, getRecordKeys } from "../Types/Record";
|
||||
|
||||
interface IParams {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { CorpEmployeeJob } from "./data/Enums";
|
||||
import type { Division } from "./Division";
|
||||
|
||||
import { CorpMaterialName } from "@nsdefs";
|
||||
import { CityName, CorpEmployeeJob } from "@enums";
|
||||
import { IndustriesData } from "./data/IndustryData";
|
||||
import { MaterialInfo } from "./MaterialInfo";
|
||||
import { Division } from "./Division";
|
||||
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { getRandomInt } from "../utils/helpers/getRandomInt";
|
||||
import { CityName } from "../Enums";
|
||||
import { CorpMaterialName } from "@nsdefs";
|
||||
import { PartialRecord, createEnumKeyedRecord, getRecordEntries, getRecordKeys } from "../Types/Record";
|
||||
|
||||
interface IConstructorParams {
|
||||
|
@ -1,15 +1,14 @@
|
||||
import type { Corporation } from "./Corporation";
|
||||
import type { Division } from "./Division";
|
||||
|
||||
import { Player } from "@player";
|
||||
import { CorpMaterialName, CorpSmartSupplyOption } from "@nsdefs";
|
||||
|
||||
import { CityName, CorpUnlockName } from "@enums";
|
||||
import { Material } from "./Material";
|
||||
import { Corporation } from "./Corporation";
|
||||
import { Division } from "./Division";
|
||||
import { MaterialInfo } from "./MaterialInfo";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { CityName } from "../Enums";
|
||||
import { materialNames } from "./data/Constants";
|
||||
import { createFullRecordFromEntries, getRecordEntries } from "../Types/Record";
|
||||
import { CorpUnlockName } from "./data/Enums";
|
||||
|
||||
interface IConstructorParams {
|
||||
division: Division;
|
||||
|
@ -1,21 +1,26 @@
|
||||
import {
|
||||
CorpEmployeePosition,
|
||||
CorpIndustryName,
|
||||
CorpMaterialName,
|
||||
CorpMaterialName as APIMaterialName,
|
||||
CorpResearchName,
|
||||
CorpSmartSupplyOption,
|
||||
CorpStateName,
|
||||
CorpUnlockName,
|
||||
CorpUpgradeName,
|
||||
CorpUnlockName as APIUnlockName,
|
||||
CorpUpgradeName as APIUpgradeName,
|
||||
} from "@nsdefs";
|
||||
import { CONSTANTS } from "../../Constants";
|
||||
import { IndustryType, CorpEmployeeJob } from "./Enums";
|
||||
import {
|
||||
IndustryType,
|
||||
CorpEmployeeJob,
|
||||
CorpMaterialName,
|
||||
CorpUnlockName,
|
||||
CorpUpgradeName,
|
||||
SmartSupplyOption,
|
||||
CorpBaseResearchName,
|
||||
CorpProductResearchName,
|
||||
} from "@enums";
|
||||
import { PositiveInteger } from "../../types";
|
||||
|
||||
// For typed strings, we need runtime objects to do API typechecking against.
|
||||
|
||||
// This structure + import * as corpConstants allows easier type definitions for individual properties.
|
||||
|
||||
/** Names of all corporation game states */
|
||||
export const stateNames: CorpStateName[] = ["START", "PURCHASE", "PRODUCTION", "EXPORT", "SALE"],
|
||||
// TODO: remove IndustryType and EmployeePositions enums and just use the typed strings.
|
||||
@ -24,70 +29,14 @@ export const stateNames: CorpStateName[] = ["START", "PURCHASE", "PRODUCTION", "
|
||||
/** Names of all industries. */
|
||||
industryNames: CorpIndustryName[] = Object.values(IndustryType),
|
||||
/** Names of all materials */
|
||||
materialNames: CorpMaterialName[] = [
|
||||
"Water",
|
||||
"Ore",
|
||||
"Minerals",
|
||||
"Food",
|
||||
"Plants",
|
||||
"Metal",
|
||||
"Hardware",
|
||||
"Chemicals",
|
||||
"Drugs",
|
||||
"Robots",
|
||||
"AI Cores",
|
||||
"Real Estate",
|
||||
],
|
||||
materialNames: APIMaterialName[] = Object.values(CorpMaterialName),
|
||||
/** Names of all one-time corporation-wide unlocks */
|
||||
unlockNames: CorpUnlockName[] = [
|
||||
"Export",
|
||||
"Smart Supply",
|
||||
"Market Research - Demand",
|
||||
"Market Data - Competition",
|
||||
"VeChain",
|
||||
"Shady Accounting",
|
||||
"Government Partnership",
|
||||
"Warehouse API",
|
||||
"Office API",
|
||||
],
|
||||
upgradeNames: CorpUpgradeName[] = [
|
||||
"Smart Factories",
|
||||
"Smart Storage",
|
||||
"DreamSense",
|
||||
"Wilson Analytics",
|
||||
"Nuoptimal Nootropic Injector Implants",
|
||||
"Speech Processor Implants",
|
||||
"Neural Accelerators",
|
||||
"FocusWires",
|
||||
"ABC SalesBots",
|
||||
"Project Insight",
|
||||
],
|
||||
unlockNames: APIUnlockName[] = Object.values(CorpUnlockName),
|
||||
upgradeNames: APIUpgradeName[] = Object.values(CorpUpgradeName),
|
||||
/** Names of all reasearches common to all industries */
|
||||
researchNamesBase: CorpResearchName[] = [
|
||||
"Hi-Tech R&D Laboratory",
|
||||
"AutoBrew",
|
||||
"AutoPartyManager",
|
||||
"Automatic Drug Administration",
|
||||
"CPH4 Injections",
|
||||
"Drones",
|
||||
"Drones - Assembly",
|
||||
"Drones - Transport",
|
||||
"Go-Juice",
|
||||
"HRBuddy-Recruitment",
|
||||
"HRBuddy-Training",
|
||||
"Market-TA.I",
|
||||
"Market-TA.II",
|
||||
"Overclock",
|
||||
"Self-Correcting Assemblers",
|
||||
"Sti.mu",
|
||||
],
|
||||
researchNamesBase: CorpResearchName[] = Object.values(CorpBaseResearchName),
|
||||
/** Names of all researches only available to product industries */
|
||||
researchNamesProductOnly: CorpResearchName[] = [
|
||||
"uPgrade: Capacity.I",
|
||||
"uPgrade: Capacity.II",
|
||||
"uPgrade: Dashboard",
|
||||
"uPgrade: Fulcrum",
|
||||
],
|
||||
researchNamesProductOnly: CorpResearchName[] = Object.values(CorpProductResearchName),
|
||||
/** Names of all researches */
|
||||
researchNames: CorpResearchName[] = [...researchNamesBase, ...researchNamesProductOnly],
|
||||
initialShares = 1e9,
|
||||
@ -123,7 +72,7 @@ export const stateNames: CorpStateName[] = ["START", "PURCHASE", "PRODUCTION", "
|
||||
/** Minimum decay value for employee morale/energy */
|
||||
minEmployeeDecay = 10,
|
||||
/** smart supply options */
|
||||
smartSupplyOptions: CorpSmartSupplyOption[] = ["leftovers", "imports", "none"],
|
||||
smartSupplyOptions: CorpSmartSupplyOption[] = Object.values(SmartSupplyOption),
|
||||
PurchaseMultipliers = {
|
||||
x1: 1 as PositiveInteger,
|
||||
x5: 5 as PositiveInteger,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CorpUnlockName } from "./Enums";
|
||||
import { CorpUnlockName } from "@enums";
|
||||
|
||||
export interface CorpUnlock {
|
||||
name: CorpUnlockName;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CorpUpgradeName } from "./Enums";
|
||||
import { CorpUpgradeName } from "@enums";
|
||||
|
||||
export interface CorpUpgrade {
|
||||
name: CorpUpgradeName;
|
||||
|
@ -1,52 +0,0 @@
|
||||
export enum IndustryType {
|
||||
Water = "Water Utilities",
|
||||
Spring = "Spring Water",
|
||||
Agriculture = "Agriculture",
|
||||
Fishing = "Fishing",
|
||||
Mining = "Mining",
|
||||
Refinery = "Refinery",
|
||||
Restaurant = "Restaurant",
|
||||
Tobacco = "Tobacco",
|
||||
Chemical = "Chemical",
|
||||
Pharmaceutical = "Pharmaceutical",
|
||||
Computers = "Computer Hardware",
|
||||
Robotics = "Robotics",
|
||||
Software = "Software",
|
||||
Healthcare = "Healthcare",
|
||||
RealEstate = "Real Estate",
|
||||
}
|
||||
|
||||
export enum CorpEmployeeJob {
|
||||
Operations = "Operations",
|
||||
Engineer = "Engineer",
|
||||
Business = "Business",
|
||||
Management = "Management",
|
||||
RandD = "Research & Development",
|
||||
Intern = "Intern",
|
||||
Unassigned = "Unassigned",
|
||||
}
|
||||
|
||||
export enum CorpUnlockName {
|
||||
Export = "Export",
|
||||
SmartSupply = "Smart Supply",
|
||||
MarketResearchDemand = "Market Research - Demand",
|
||||
MarketDataCompetition = "Market Data - Competition",
|
||||
VeChain = "VeChain",
|
||||
ShadyAccounting = "Shady Accounting",
|
||||
GovernmentPartnership = "Government Partnership",
|
||||
WarehouseAPI = "Warehouse API",
|
||||
OfficeAPI = "Office API",
|
||||
}
|
||||
|
||||
export enum CorpUpgradeName {
|
||||
SmartFactories = "Smart Factories",
|
||||
SmartStorage = "Smart Storage",
|
||||
DreamSense = "DreamSense",
|
||||
WilsonAnalytics = "Wilson Analytics",
|
||||
NuoptimalNootropicInjectorImplants = "Nuoptimal Nootropic Injector Implants",
|
||||
SpeechProcessorImplants = "Speech Processor Implants",
|
||||
NeuralAccelerators = "Neural Accelerators",
|
||||
FocusWires = "FocusWires",
|
||||
ABCSalesBots = "ABC SalesBots",
|
||||
ProjectInsight = "Project Insight",
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { CorpIndustryData } from "@nsdefs";
|
||||
|
||||
import { createFullRecordFromEntries } from "../../Types/Record";
|
||||
import { IndustryType } from "./Enums";
|
||||
import { IndustryType } from "@enums";
|
||||
import { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from "./BaseResearchTree";
|
||||
|
||||
export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
|
||||
|
@ -1,13 +1,13 @@
|
||||
// React Components for the Corporation UI's City navigation tabs
|
||||
// These allow player to navigate between different cities for each industry
|
||||
import type { OfficeSpace } from "../OfficeSpace";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { OfficeSpace } from "../OfficeSpace";
|
||||
import { Tab, Tabs } from "@mui/material";
|
||||
import { CityName } from "@enums";
|
||||
import { Division } from "./Division";
|
||||
import { ExpandNewCity } from "./ExpandNewCity";
|
||||
import { useDivision } from "./Context";
|
||||
import Tabs from "@mui/material/Tabs";
|
||||
import Tab from "@mui/material/Tab";
|
||||
import { CityName } from "../../Enums";
|
||||
import { getRecordKeys } from "../../Types/Record";
|
||||
|
||||
interface IProps {
|
||||
|
@ -1,15 +1,14 @@
|
||||
// React Component for managing the Corporation's Industry UI
|
||||
// This Industry component does NOT include the city tabs at the top
|
||||
import React from "react";
|
||||
|
||||
import { Box } from "@mui/material";
|
||||
import { CityName } from "@enums";
|
||||
import { DivisionOffice } from "./DivisionOffice";
|
||||
import { DivisionOverview } from "./DivisionOverview";
|
||||
import { DivisionWarehouse } from "./DivisionWarehouse";
|
||||
import { Warehouse } from "../Warehouse";
|
||||
import { OfficeSpace } from "../OfficeSpace";
|
||||
import { useCorporation, useDivision } from "./Context";
|
||||
import Box from "@mui/material/Box";
|
||||
import { CityName } from "../../Enums";
|
||||
|
||||
interface IProps {
|
||||
city: CityName;
|
||||
|
@ -3,7 +3,7 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { OfficeSpace } from "../OfficeSpace";
|
||||
import { CorpUnlockName, CorpEmployeeJob } from "../data/Enums";
|
||||
import { CorpUnlockName, CorpEmployeeJob } from "@enums";
|
||||
import { BuyTea } from "../Actions";
|
||||
|
||||
import { MoneyCost } from "./MoneyCost";
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (top-left panel in the Division UI)
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { CorpUnlockName, IndustryType } from "../data/Enums";
|
||||
import { CorpUnlockName, IndustryType } from "@enums";
|
||||
import { HireAdVert } from "../Actions";
|
||||
import { formatBigNumber } from "../../ui/formatNumber";
|
||||
import { createProgressBarText } from "../../utils/helpers/createProgressBarText";
|
||||
|
@ -1,8 +1,10 @@
|
||||
// React Component for displaying an Industry's warehouse information
|
||||
// (right-side panel in the Industry UI)
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { createStyles, makeStyles } from "@mui/styles";
|
||||
import { Box, Button, Paper, Tooltip, Typography } from "@mui/material";
|
||||
import * as corpConstants from "../data/Constants";
|
||||
import { CityName, CorpUnlockName } from "@enums";
|
||||
import { Warehouse } from "../Warehouse";
|
||||
import { SmartSupplyModal } from "./modals/SmartSupplyModal";
|
||||
import { ProductElem } from "./ProductElem";
|
||||
@ -19,16 +21,7 @@ import { IndustryProductEquation } from "./IndustryProductEquation";
|
||||
import { purchaseWarehouse } from "../Actions";
|
||||
import { useCorporation, useDivision } from "./Context";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import { ButtonWithTooltip } from "../../ui/Components/ButtonWithTooltip";
|
||||
import Button from "@mui/material/Button";
|
||||
import Box from "@mui/material/Box";
|
||||
import makeStyles from "@mui/styles/makeStyles";
|
||||
import createStyles from "@mui/styles/createStyles";
|
||||
import { CityName } from "../../Enums";
|
||||
import { CorpUnlockName } from "../data/Enums";
|
||||
|
||||
interface WarehouseProps {
|
||||
corp: Corporation;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
import * as corpConstants from "../data/Constants";
|
||||
import { CityName } from "@enums";
|
||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||
import { purchaseOffice } from "../Actions";
|
||||
import { MoneyCost } from "./MoneyCost";
|
||||
@ -8,7 +9,6 @@ import Typography from "@mui/material/Typography";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { ButtonWithTooltip } from "../../ui/Components/ButtonWithTooltip";
|
||||
import { CityName } from "../../Enums";
|
||||
|
||||
interface IProps {
|
||||
cityStateSetter: (city: CityName | "Expand") => void;
|
||||
|
@ -4,7 +4,7 @@ import Typography from "@mui/material/Typography";
|
||||
|
||||
import { MoneyCost } from "./MoneyCost";
|
||||
import { Corporation } from "../Corporation";
|
||||
import { IndustryType } from "../data/Enums";
|
||||
import { IndustryType } from "@enums";
|
||||
import { IndustriesData } from "../data/IndustryData";
|
||||
|
||||
interface IProps {
|
||||
|
@ -11,7 +11,7 @@ import { ButtonWithTooltip } from "../../ui/Components/ButtonWithTooltip";
|
||||
import Box from "@mui/material/Box";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import { calculateMaxAffordableUpgrade, calculateUpgradeCost } from "../helpers";
|
||||
import { CorpUpgradeName } from "../data/Enums";
|
||||
import { CorpUpgradeName } from "@enums";
|
||||
import { PositiveInteger } from "../../types";
|
||||
|
||||
interface IProps {
|
||||
|
@ -6,7 +6,7 @@ import React from "react";
|
||||
import { CityTabs } from "./CityTabs";
|
||||
import { Context, useCorporation } from "./Context";
|
||||
|
||||
import { CityName } from "../../Enums";
|
||||
import { CityName } from "@enums";
|
||||
|
||||
interface IProps {
|
||||
divisionName: string;
|
||||
|
@ -1,28 +1,19 @@
|
||||
// React Component for displaying an Industry's warehouse information
|
||||
// (right-side panel in the Industry UI)
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { Box, Button, Paper, Tooltip, Typography } from "@mui/material";
|
||||
import { CityName, CorpUnlockName } from "@enums";
|
||||
import { Material } from "../Material";
|
||||
import { Warehouse } from "../Warehouse";
|
||||
import { ExportModal } from "./modals/ExportModal";
|
||||
import { MaterialMarketTaModal } from "./modals/MaterialMarketTaModal";
|
||||
import { SellMaterialModal } from "./modals/SellMaterialModal";
|
||||
import { PurchaseMaterialModal } from "./modals/PurchaseMaterialModal";
|
||||
|
||||
import { formatBigNumber, formatCorpStat, formatMoney, formatQuality } from "../../ui/formatNumber";
|
||||
|
||||
import { isString } from "../../utils/helpers/string";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { useCorporation, useDivision } from "./Context";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Button from "@mui/material/Button";
|
||||
import Box from "@mui/material/Box";
|
||||
import { LimitMaterialProductionModal } from "./modals/LimitMaterialProductionModal";
|
||||
import { CityName } from "../../Enums";
|
||||
import { CorpUnlockName } from "../data/Enums";
|
||||
|
||||
interface IMaterialProps {
|
||||
warehouse: Warehouse;
|
||||
|
@ -8,7 +8,7 @@ import Typography from "@mui/material/Typography";
|
||||
|
||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||
import { IndustriesData } from "../data/IndustryData";
|
||||
import { IndustryType } from "../data/Enums";
|
||||
import { IndustryType } from "@enums";
|
||||
import { useCorporation } from "./Context";
|
||||
import { NewDivision } from "../Actions";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import type { CityName } from "src/Enums";
|
||||
import { Box, Button, Paper, Tooltip, Typography } from "@mui/material";
|
||||
import { CityName, CorpUnlockName } from "@enums";
|
||||
import * as corpConstants from "../data/Constants";
|
||||
import { Product } from "../Product";
|
||||
import { DiscontinueProductModal } from "./modals/DiscontinueProductModal";
|
||||
@ -15,13 +15,6 @@ import { isString } from "../../utils/helpers/string";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { useCorporation, useDivision } from "./Context";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Button from "@mui/material/Button";
|
||||
import Box from "@mui/material/Box";
|
||||
import { CorpUnlockName } from "../data/Enums";
|
||||
|
||||
interface IProductProps {
|
||||
city: CityName;
|
||||
product: Product;
|
||||
|
@ -9,7 +9,7 @@ import Tooltip from "@mui/material/Tooltip";
|
||||
import Button from "@mui/material/Button";
|
||||
import Box from "@mui/material/Box";
|
||||
import Grid from "@mui/material/Grid";
|
||||
import { CorpUnlockName } from "../data/Enums";
|
||||
import { CorpUnlockName } from "@enums";
|
||||
import { dialogBoxCreate } from "../../ui/React/DialogBox";
|
||||
|
||||
interface UnlockProps {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { CityName } from "@enums";
|
||||
import { dialogBoxCreate } from "../../../ui/React/DialogBox";
|
||||
import { Material } from "../../Material";
|
||||
import { Export } from "../../Export";
|
||||
@ -13,7 +14,6 @@ import Button from "@mui/material/Button";
|
||||
import Box from "@mui/material/Box";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { CityName } from "../../../Enums";
|
||||
import { useRerender } from "../../../ui/React/hooks";
|
||||
import { getRecordKeys } from "../../../Types/Record";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import type { CityName } from "../../../Enums";
|
||||
import type { CityName } from "@enums";
|
||||
import type { Product } from "../../Product";
|
||||
import { LimitProductProduction } from "../../Actions";
|
||||
import { Modal } from "../../../ui/React/Modal";
|
||||
|
@ -2,7 +2,7 @@ import React, { useState } from "react";
|
||||
import { dialogBoxCreate } from "../../../ui/React/DialogBox";
|
||||
import { Modal } from "../../../ui/React/Modal";
|
||||
import { IndustriesData } from "../../data/IndustryData";
|
||||
import { IndustryType } from "../../data/Enums";
|
||||
import { IndustryType } from "@enums";
|
||||
import { MakeProduct } from "../../Actions";
|
||||
import { useCorporation, useDivision } from "../Context";
|
||||
import Typography from "@mui/material/Typography";
|
||||
@ -12,7 +12,7 @@ import MenuItem from "@mui/material/MenuItem";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { KEY } from "../../../utils/helpers/keyCodes";
|
||||
import { NumberInput } from "../../../ui/React/NumberInput";
|
||||
import { CityName } from "../../../Enums";
|
||||
import { CityName } from "@enums";
|
||||
import { getRecordKeys } from "../../../Types/Record";
|
||||
|
||||
interface IProps {
|
||||
|
@ -6,7 +6,7 @@ import Button from "@mui/material/Button";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { useCorporation } from "../../ui/Context";
|
||||
import { CityName } from "../../../Enums";
|
||||
import { CityName } from "@enums";
|
||||
import * as corpConstants from "../../data/Constants";
|
||||
import { formatMoney } from "../../../ui/formatNumber";
|
||||
import { removeDivision as removeDivision } from "../../Actions";
|
||||
|
@ -10,7 +10,7 @@ import Button from "@mui/material/Button";
|
||||
import FormControlLabel from "@mui/material/FormControlLabel";
|
||||
import Switch from "@mui/material/Switch";
|
||||
import { KEY } from "../../../utils/helpers/keyCodes";
|
||||
import { CityName } from "../../../Enums";
|
||||
import { CityName } from "@enums";
|
||||
|
||||
function initialPrice(product: Product, city: CityName): string {
|
||||
let val = String(product.cityData[city].desiredSellPrice || "");
|
||||
|
@ -1,3 +1,4 @@
|
||||
// Numeric enum
|
||||
export enum FragmentType {
|
||||
// Special fragments for the UI
|
||||
None,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import { Player } from "@player";
|
||||
import { AugmentationName, FactionName } from "@enums";
|
||||
import { Fragment } from "./Fragment";
|
||||
import { ActiveFragment } from "./ActiveFragment";
|
||||
import { FragmentType } from "./FragmentType";
|
||||
@ -9,8 +10,6 @@ import { StaneksGiftEvents } from "./StaneksGiftEvents";
|
||||
import { Generic_fromJSON, Generic_toJSON, IReviverValue, constructorsForReviver } from "../utils/JSONReviver";
|
||||
import { StanekConstants } from "./data/Constants";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
import { Player } from "@player";
|
||||
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
||||
import { defaultMultipliers, mergeMultipliers, Multipliers, scaleMultipliers } from "../PersonObjects/Multipliers";
|
||||
import { StaticAugmentations } from "../Augmentation/StaticAugmentations";
|
||||
import { getKeyList } from "../utils/helpers/getKeyList";
|
||||
@ -42,7 +41,7 @@ export class StaneksGift extends BaseGift {
|
||||
af.numCharge += threads / af.highestCharge;
|
||||
}
|
||||
|
||||
const cotmg = Factions[FactionNames.ChurchOfTheMachineGod];
|
||||
const cotmg = Factions[FactionName.ChurchOfTheMachineGod];
|
||||
cotmg.playerReputation += (Player.mults.faction_rep * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;
|
||||
this.justCharged = true;
|
||||
}
|
||||
@ -52,7 +51,7 @@ export class StaneksGift extends BaseGift {
|
||||
}
|
||||
|
||||
process(numCycles = 1): void {
|
||||
if (!Player.hasAugmentation(AugmentationNames.StaneksGift1)) return;
|
||||
if (!Player.hasAugmentation(AugmentationName.StaneksGift1)) return;
|
||||
this.storedCycles += numCycles;
|
||||
const usedCycles = this.isBonusCharging ? 5 : 1;
|
||||
this.isBonusCharging = false;
|
||||
@ -217,13 +216,13 @@ export class StaneksGift extends BaseGift {
|
||||
const mults = this.calculateMults();
|
||||
Player.mults = mergeMultipliers(Player.mults, mults);
|
||||
Player.updateSkillLevels();
|
||||
const zoeAmt = Player.sleeves.reduce((n, sleeve) => n + (sleeve.hasAugmentation(AugmentationNames.ZOE) ? 1 : 0), 0);
|
||||
const zoeAmt = Player.sleeves.reduce((n, sleeve) => n + (sleeve.hasAugmentation(AugmentationName.ZOE) ? 1 : 0), 0);
|
||||
if (zoeAmt === 0) return;
|
||||
// Less powerful for each copy.
|
||||
const scaling = 3 / (zoeAmt + 2);
|
||||
const sleeveMults = scaleMultipliers(mults, scaling);
|
||||
for (const sleeve of Player.sleeves) {
|
||||
if (!sleeve.hasAugmentation(AugmentationNames.ZOE)) continue;
|
||||
if (!sleeve.hasAugmentation(AugmentationName.ZOE)) continue;
|
||||
sleeve.resetMultipliers();
|
||||
//reapplying augmentation's multiplier
|
||||
for (let i = 0; i < sleeve.augmentations.length; ++i) {
|
||||
|
@ -2,7 +2,7 @@ import { CONSTANTS } from "../Constants";
|
||||
import { Player } from "@player";
|
||||
import { Person as IPerson } from "@nsdefs";
|
||||
import { WorkerScript } from "../Netscript/WorkerScript";
|
||||
import { CrimeType } from "../Enums";
|
||||
import { CrimeType } from "@enums";
|
||||
import { CrimeWork } from "../Work/CrimeWork";
|
||||
import { calculateIntelligenceBonus } from "../PersonObjects/formulas/intelligence";
|
||||
|
||||
|
@ -2,23 +2,22 @@ import { Crimes } from "./Crimes";
|
||||
import { Crime } from "./Crime";
|
||||
import { Player } from "@player";
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { checkEnum } from "../utils/helpers/enum";
|
||||
import { CrimeType } from "../Enums";
|
||||
import { getEnumHelper } from "../utils/EnumHelper";
|
||||
import { CrimeType } from "@enums";
|
||||
|
||||
//This is only used for the player
|
||||
export function determineCrimeSuccess(type: string): boolean {
|
||||
if (!checkEnum(CrimeType, type)) {
|
||||
dialogBoxCreate(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`);
|
||||
return false;
|
||||
}
|
||||
export function determineCrimeSuccess(type: CrimeType): boolean {
|
||||
const crime = Crimes[type];
|
||||
const chance = crime.successRate(Player);
|
||||
return Math.random() <= chance;
|
||||
}
|
||||
|
||||
export function findCrime(roughName: string): Crime | null {
|
||||
if (checkEnum(CrimeType, roughName)) return Crimes[roughName];
|
||||
const helper = getEnumHelper("CrimeType");
|
||||
if (helper.isMember(roughName)) return Crimes[roughName];
|
||||
const fuzzMatch = getEnumHelper("CrimeType").fuzzyGetMember(roughName);
|
||||
if (fuzzMatch) return Crimes[fuzzMatch];
|
||||
// This can probably all be removed
|
||||
roughName = roughName.toLowerCase();
|
||||
if (roughName.includes("shoplift")) return Crimes[CrimeType.shoplift];
|
||||
else if (roughName.includes("rob") && roughName.includes("store")) return Crimes[CrimeType.robStore];
|
||||
@ -33,5 +32,6 @@ export function findCrime(roughName: string): Crime | null {
|
||||
else if (roughName.includes("kidnap")) return Crimes[CrimeType.kidnap];
|
||||
else if (roughName.includes("assassin")) return Crimes[CrimeType.assassination];
|
||||
else if (roughName.includes("heist")) return Crimes[CrimeType.heist];
|
||||
//
|
||||
return null;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Crime } from "./Crime";
|
||||
import { CONSTANTS } from "../Constants";
|
||||
import { CrimeType } from "../Enums";
|
||||
import { CrimeType } from "@enums";
|
||||
|
||||
export const Crimes: Record<CrimeType, Crime> = {
|
||||
[CrimeType.shoplift]: new Crime(
|
||||
|
14
src/Crime/Enums.ts
Normal file
14
src/Crime/Enums.ts
Normal file
@ -0,0 +1,14 @@
|
||||
export enum CrimeType {
|
||||
shoplift = "Shoplift",
|
||||
robStore = "Rob Store",
|
||||
mug = "Mug",
|
||||
larceny = "Larceny",
|
||||
dealDrugs = "Deal Drugs",
|
||||
bondForgery = "Bond Forgery",
|
||||
traffickArms = "Traffick Arms",
|
||||
homicide = "Homicide",
|
||||
grandTheftAuto = "Grand Theft Auto",
|
||||
kidnap = "Kidnap",
|
||||
assassination = "Assassination",
|
||||
heist = "Heist",
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import type { CompletedProgramName } from "../Programs/Programs";
|
||||
import type { CompletedProgramName } from "@enums";
|
||||
|
||||
export class DarkWebItem {
|
||||
program: CompletedProgramName;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { DarkWebItem } from "./DarkWebItem";
|
||||
import { CompletedProgramName } from "../Programs/Programs";
|
||||
import { CompletedProgramName } from "@enums";
|
||||
|
||||
export const DarkWebItems = {
|
||||
BruteSSHProgram: new DarkWebItem(CompletedProgramName.bruteSsh, 500e3, "Opens up SSH Ports."),
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Player } from "@player";
|
||||
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
@ -52,7 +52,7 @@ export function DevMenuRoot(): React.ReactElement {
|
||||
{Player.hasWseAccount && <StockMarket />}
|
||||
|
||||
{Player.sleeves.length > 0 && <Sleeves />}
|
||||
{Player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && <Stanek />}
|
||||
{Player.augmentations.some((aug) => aug.name === AugmentationName.StaneksGift1) && <Stanek />}
|
||||
|
||||
<TimeSkip />
|
||||
<Achievements />
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { Player } from "@player";
|
||||
import React, { useState } from "react";
|
||||
import { Clear, ExpandMore, Reply, ReplyAll } from "@mui/icons-material";
|
||||
import {
|
||||
Accordion,
|
||||
@ -10,9 +12,7 @@ import {
|
||||
SelectChangeEvent,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { Player } from "@player";
|
||||
import { AugmentationName } from "@enums";
|
||||
|
||||
export function Augmentations(): React.ReactElement {
|
||||
const [augmentation, setAugmentation] = useState("Augmented Targeting I");
|
||||
@ -25,7 +25,7 @@ export function Augmentations(): React.ReactElement {
|
||||
}
|
||||
|
||||
function queueAllAugs(): void {
|
||||
for (const augName of Object.values(AugmentationNames)) {
|
||||
for (const augName of Object.values(AugmentationName)) {
|
||||
Player.queueAugmentation(augName);
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ export function Augmentations(): React.ReactElement {
|
||||
</>
|
||||
}
|
||||
>
|
||||
{Object.values(AugmentationNames).map((aug) => (
|
||||
{Object.values(AugmentationName).map((aug) => (
|
||||
<MenuItem key={aug} value={aug}>
|
||||
{aug}
|
||||
</MenuItem>
|
||||
|
@ -15,7 +15,7 @@ import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import DeleteIcon from "@mui/icons-material/Delete";
|
||||
import { Adjuster } from "./Adjuster";
|
||||
import { Player } from "@player";
|
||||
import { CityName } from "../../Enums";
|
||||
import { CityName } from "@enums";
|
||||
import { Skills as AllSkills } from "../../Bladeburner/Skills";
|
||||
import { SkillNames } from "../../Bladeburner/data/SkillNames";
|
||||
|
||||
|
@ -4,19 +4,19 @@ import Accordion from "@mui/material/Accordion";
|
||||
import AccordionSummary from "@mui/material/AccordionSummary";
|
||||
import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Button from "@mui/material/Button";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { Companies as AllCompanies } from "../../Company/Companies";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
|
||||
import { FactionName } from "@enums";
|
||||
import { Companies as AllCompanies } from "../../Company/Companies";
|
||||
import { Adjuster } from "./Adjuster";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
|
||||
const bigNumber = 1e12;
|
||||
|
||||
export function Companies(): React.ReactElement {
|
||||
const [company, setCompany] = useState(FactionNames.ECorp as string);
|
||||
const [company, setCompany] = useState(FactionName.ECorp as string);
|
||||
function setCompanyDropdown(event: SelectChangeEvent): void {
|
||||
setCompany(event.target.value);
|
||||
}
|
||||
|
@ -1,28 +1,30 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import Accordion from "@mui/material/Accordion";
|
||||
import AccordionSummary from "@mui/material/AccordionSummary";
|
||||
import AccordionDetails from "@mui/material/AccordionDetails";
|
||||
import { Player } from "@player";
|
||||
import { FactionName } from "@enums";
|
||||
import {
|
||||
Accordion,
|
||||
AccordionSummary,
|
||||
AccordionDetails,
|
||||
Button,
|
||||
FormControl,
|
||||
IconButton,
|
||||
InputLabel,
|
||||
MenuItem,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Button from "@mui/material/Button";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { Adjuster } from "./Adjuster";
|
||||
import { Player } from "@player";
|
||||
import { Factions as AllFaction } from "../../Faction/Factions";
|
||||
import FormControl from "@mui/material/FormControl";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import ReplyAllIcon from "@mui/icons-material/ReplyAll";
|
||||
import ReplyIcon from "@mui/icons-material/Reply";
|
||||
import InputLabel from "@mui/material/InputLabel";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
|
||||
const bigNumber = 1e12;
|
||||
|
||||
export function Factions(): React.ReactElement {
|
||||
const [faction, setFaction] = useState(FactionNames.Illuminati as string);
|
||||
const [faction, setFaction] = useState(FactionName.Illuminati as string);
|
||||
|
||||
function setFactionDropdown(event: SelectChangeEvent): void {
|
||||
setFaction(event.target.value);
|
||||
@ -33,7 +35,7 @@ export function Factions(): React.ReactElement {
|
||||
}
|
||||
|
||||
function receiveAllInvites(): void {
|
||||
Object.values(FactionNames).forEach((faction) => Player.receiveInvite(faction));
|
||||
Object.values(FactionName).forEach((faction) => Player.receiveInvite(faction));
|
||||
}
|
||||
|
||||
function modifyFactionRep(modifier: number): (x: number) => void {
|
||||
|
@ -11,7 +11,7 @@ import { Router } from "../../ui/GameRoot";
|
||||
import { MenuItem, SelectChangeEvent, TextField, Select } from "@mui/material";
|
||||
import { Bladeburner } from "../../Bladeburner/Bladeburner";
|
||||
import { GangConstants } from "../../Gang/data/Constants";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
import { checkForMessagesToSend } from "../../Message/MessageHelpers";
|
||||
import { ThemeEvents } from "../../Themes/ui/Theme";
|
||||
|
||||
@ -61,7 +61,7 @@ export function General(): React.ReactElement {
|
||||
|
||||
// Gang functions
|
||||
const startGang = () => {
|
||||
const isHacking = gangFaction === FactionNames.NiteSec || gangFaction === FactionNames.TheBlackHand;
|
||||
const isHacking = gangFaction === FactionName.NiteSec || gangFaction === FactionName.TheBlackHand;
|
||||
Player.startGang(gangFaction, isHacking);
|
||||
// Rerender so the gang menu option will show up immediately on the devmenu page selection
|
||||
ThemeEvents.emit();
|
||||
|
@ -10,7 +10,7 @@ import Button from "@mui/material/Button";
|
||||
import Select, { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { Player } from "@player";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import { CompletedProgramName } from "../../Programs/Programs";
|
||||
import { CompletedProgramName } from "@enums";
|
||||
|
||||
export function Programs(): React.ReactElement {
|
||||
const [program, setProgram] = useState(CompletedProgramName.bruteSsh);
|
||||
|
@ -7,7 +7,8 @@ import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { saveObject } from "../../SaveObject";
|
||||
import { SnackbarEvents, ToastVariant } from "../../ui/React/Snackbar";
|
||||
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||
import { ToastVariant } from "@enums";
|
||||
import { Upload } from "@mui/icons-material";
|
||||
import { Button } from "@mui/material";
|
||||
import { OptionSwitch } from "../../ui/React/OptionSwitch";
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Player } from "@player";
|
||||
import { Router } from "./ui/GameRoot";
|
||||
import { Terminal } from "./Terminal";
|
||||
import { SnackbarEvents, ToastVariant } from "./ui/React/Snackbar";
|
||||
import { SnackbarEvents } from "./ui/React/Snackbar";
|
||||
import { ToastVariant } from "@enums";
|
||||
import { IReturnStatus } from "./types";
|
||||
import { GetServer } from "./Server/AllServers";
|
||||
import { ImportPlayerData, SaveData, saveObject } from "./SaveObject";
|
||||
|
169
src/Enums.ts
169
src/Enums.ts
@ -1,157 +1,14 @@
|
||||
/** Job for company work */
|
||||
export enum JobName {
|
||||
software0 = "Software Engineering Intern",
|
||||
software1 = "Junior Software Engineer",
|
||||
software2 = "Senior Software Engineer",
|
||||
software3 = "Lead Software Developer",
|
||||
software4 = "Head of Software",
|
||||
software5 = "Head of Engineering",
|
||||
software6 = "Vice President of Technology",
|
||||
software7 = "Chief Technology Officer",
|
||||
IT0 = "IT Intern",
|
||||
IT1 = "IT Analyst",
|
||||
IT2 = "IT Manager",
|
||||
IT3 = "Systems Administrator",
|
||||
securityEng = "Security Engineer",
|
||||
networkEng0 = "Network Engineer",
|
||||
networkEng1 = "Network Administrator",
|
||||
business0 = "Business Intern",
|
||||
business1 = "Business Analyst",
|
||||
business2 = "Business Manager",
|
||||
business3 = "Operations Manager",
|
||||
business4 = "Chief Financial Officer",
|
||||
business5 = "Chief Executive Officer",
|
||||
security0 = "Police Officer",
|
||||
security1 = "Police Chief",
|
||||
security2 = "Security Guard",
|
||||
security3 = "Security Officer",
|
||||
security4 = "Security Supervisor",
|
||||
security5 = "Head of Security",
|
||||
agent0 = "Field Agent",
|
||||
agent1 = "Secret Agent",
|
||||
agent2 = "Special Operative",
|
||||
waiter = "Waiter",
|
||||
employee = "Employee",
|
||||
softwareConsult0 = "Software Consultant",
|
||||
softwareConsult1 = "Senior Software Consultant",
|
||||
businessConsult0 = "Business Consultant",
|
||||
businessConsult1 = "Senior Business Consultant",
|
||||
waiterPT = "Part-time Waiter",
|
||||
employeePT = "Part-time Employee",
|
||||
}
|
||||
// Using this file makes importing enums easier, and also verifies that no enums have the same name as each other
|
||||
|
||||
/** Crime names */
|
||||
export enum CrimeType {
|
||||
shoplift = "Shoplift",
|
||||
robStore = "Rob Store",
|
||||
mug = "Mug",
|
||||
larceny = "Larceny",
|
||||
dealDrugs = "Deal Drugs",
|
||||
bondForgery = "Bond Forgery",
|
||||
traffickArms = "Traffick Arms",
|
||||
homicide = "Homicide",
|
||||
grandTheftAuto = "Grand Theft Auto",
|
||||
kidnap = "Kidnap",
|
||||
assassination = "Assassination",
|
||||
heist = "Heist",
|
||||
}
|
||||
|
||||
export enum FactionWorkType {
|
||||
hacking = "hacking",
|
||||
field = "field",
|
||||
security = "security",
|
||||
}
|
||||
|
||||
export enum UniversityClassType {
|
||||
computerScience = "Computer Science",
|
||||
dataStructures = "Data Structures",
|
||||
networks = "Networks",
|
||||
algorithms = "Algorithms",
|
||||
management = "Management",
|
||||
leadership = "Leadership",
|
||||
}
|
||||
|
||||
//Uses skill short codes to allow easier fuzzy matching with player input
|
||||
export enum GymType {
|
||||
strength = "str",
|
||||
defense = "def",
|
||||
dexterity = "dex",
|
||||
agility = "agi",
|
||||
}
|
||||
|
||||
/** Names of all cities */
|
||||
export enum CityName {
|
||||
Aevum = "Aevum",
|
||||
Chongqing = "Chongqing",
|
||||
Sector12 = "Sector-12",
|
||||
NewTokyo = "New Tokyo",
|
||||
Ishima = "Ishima",
|
||||
Volhaven = "Volhaven",
|
||||
}
|
||||
|
||||
/** Names of all locations */
|
||||
export enum LocationName {
|
||||
AevumAeroCorp = "AeroCorp",
|
||||
AevumBachmanAndAssociates = "Bachman & Associates",
|
||||
AevumClarkeIncorporated = "Clarke Incorporated",
|
||||
AevumCrushFitnessGym = "Crush Fitness Gym",
|
||||
AevumECorp = "ECorp",
|
||||
AevumFulcrumTechnologies = "Fulcrum Technologies",
|
||||
AevumGalacticCybersystems = "Galactic Cybersystems",
|
||||
AevumNetLinkTechnologies = "NetLink Technologies",
|
||||
AevumPolice = "Aevum Police Headquarters",
|
||||
AevumRhoConstruction = "Rho Construction",
|
||||
AevumSnapFitnessGym = "Snap Fitness Gym",
|
||||
AevumSummitUniversity = "Summit University",
|
||||
AevumWatchdogSecurity = "Watchdog Security",
|
||||
AevumCasino = "Iker Molina Casino",
|
||||
|
||||
ChongqingKuaiGongInternational = "KuaiGong International",
|
||||
ChongqingSolarisSpaceSystems = "Solaris Space Systems",
|
||||
ChongqingChurchOfTheMachineGod = "Church of the Machine God",
|
||||
|
||||
Sector12AlphaEnterprises = "Alpha Enterprises",
|
||||
Sector12BladeIndustries = "Blade Industries",
|
||||
Sector12CIA = "Central Intelligence Agency",
|
||||
Sector12CarmichaelSecurity = "Carmichael Security",
|
||||
Sector12CityHall = "Sector-12 City Hall",
|
||||
Sector12DeltaOne = "DeltaOne",
|
||||
Sector12FoodNStuff = "FoodNStuff",
|
||||
Sector12FourSigma = "Four Sigma",
|
||||
Sector12IcarusMicrosystems = "Icarus Microsystems",
|
||||
Sector12IronGym = "Iron Gym",
|
||||
Sector12JoesGuns = "Joe's Guns",
|
||||
Sector12MegaCorp = "MegaCorp",
|
||||
Sector12NSA = "National Security Agency",
|
||||
Sector12PowerhouseGym = "Powerhouse Gym",
|
||||
Sector12RothmanUniversity = "Rothman University",
|
||||
Sector12UniversalEnergy = "Universal Energy",
|
||||
|
||||
NewTokyoDefComm = "DefComm",
|
||||
NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals",
|
||||
NewTokyoNoodleBar = "Noodle Bar",
|
||||
NewTokyoVitaLife = "VitaLife",
|
||||
NewTokyoArcade = "Arcade",
|
||||
|
||||
IshimaNovaMedical = "Nova Medical",
|
||||
IshimaOmegaSoftware = "Omega Software",
|
||||
IshimaStormTechnologies = "Storm Technologies",
|
||||
IshimaGlitch = "0x6C1",
|
||||
|
||||
VolhavenCompuTek = "CompuTek",
|
||||
VolhavenHeliosLabs = "Helios Labs",
|
||||
VolhavenLexoCorp = "LexoCorp",
|
||||
VolhavenMilleniumFitnessGym = "Millenium Fitness Gym",
|
||||
VolhavenNWO = "NWO",
|
||||
VolhavenOmniTekIncorporated = "OmniTek Incorporated",
|
||||
VolhavenOmniaCybersystems = "Omnia Cybersystems",
|
||||
VolhavenSysCoreSecurities = "SysCore Securities",
|
||||
VolhavenZBInstituteOfTechnology = "ZB Institute of Technology",
|
||||
|
||||
Hospital = "Hospital",
|
||||
Slums = "The Slums",
|
||||
TravelAgency = "Travel Agency",
|
||||
WorldStockExchange = "World Stock Exchange",
|
||||
|
||||
Void = "The Void",
|
||||
}
|
||||
export * from "./Augmentation/Enums";
|
||||
export * from "./Bladeburner/Enums";
|
||||
export * from "./Corporation/Enums";
|
||||
export * from "./Crime/Enums";
|
||||
export * from "./Faction/Enums";
|
||||
export * from "./Literature/Enums";
|
||||
export * from "./Locations/Enums";
|
||||
export * from "./Message/Enums";
|
||||
export * from "./Programs/Enums";
|
||||
export * from "./StockMarket/Enums";
|
||||
export * from "./ui/Enums";
|
||||
export * from "./Work/Enums";
|
||||
|
@ -10,6 +10,7 @@ hacking game is very much in the spirit of the game.
|
||||
Source-File minus 1 is extremely weak because it can be fully level up quickly.
|
||||
*/
|
||||
|
||||
// Exploits don't need an enum helper so they are not in an enums file
|
||||
export enum Exploit {
|
||||
Bypass = "Bypass",
|
||||
PrototypeTampering = "PrototypeTampering",
|
||||
@ -27,7 +28,7 @@ export enum Exploit {
|
||||
EditSaveFile = "EditSaveFile",
|
||||
}
|
||||
|
||||
const names: Record<string, string> = {
|
||||
const names: Record<Exploit, string> = {
|
||||
Bypass: "by circumventing the ram cost of document.",
|
||||
EditSaveFile: "by editing your save file.",
|
||||
PrototypeTampering: "by tampering with Numbers prototype.",
|
||||
@ -41,11 +42,12 @@ const names: Record<string, string> = {
|
||||
INeedARainbow: "by using the power of the rainbow.",
|
||||
};
|
||||
|
||||
export function ExploitName(exploit: string): string {
|
||||
export function ExploitName(exploit: Exploit): string {
|
||||
return names[exploit];
|
||||
}
|
||||
|
||||
// Needed in case player edits save file poorly
|
||||
export function sanitizeExploits(exploits: Exploit[]): Exploit[] {
|
||||
exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));
|
||||
exploits = exploits.filter((e: Exploit) => Object.values(Exploit).includes(e));
|
||||
return [...new Set(exploits)];
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
export enum FactionNames {
|
||||
export enum FactionName {
|
||||
Illuminati = "Illuminati",
|
||||
Daedalus = "Daedalus",
|
||||
TheCovenant = "The Covenant",
|
@ -1,7 +1,7 @@
|
||||
import { StaticAugmentations } from "../Augmentation/StaticAugmentations";
|
||||
import { Augmentation } from "../Augmentation/Augmentation";
|
||||
import { PlayerOwnedAugmentation } from "../Augmentation/PlayerOwnedAugmentation";
|
||||
import { AugmentationNames } from "../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName, FactionName } from "@enums";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
|
||||
import { Faction } from "./Faction";
|
||||
@ -16,7 +16,6 @@ import {
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { InvitationEvent } from "./ui/InvitationModal";
|
||||
import { FactionNames } from "./data/FactionNames";
|
||||
import { SFC32RNG } from "../Casino/RNG";
|
||||
import { isFactionWork } from "../Work/FactionWork";
|
||||
|
||||
@ -32,7 +31,7 @@ export function joinFaction(faction: Faction): void {
|
||||
if (faction.isMember) return;
|
||||
faction.isMember = true;
|
||||
Player.factions.push(faction.name);
|
||||
const allFactions = Object.values(FactionNames).map((faction) => faction as string);
|
||||
const allFactions = Object.values(FactionName).map((faction) => faction as string);
|
||||
Player.factions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));
|
||||
const factionInfo = faction.getInfo();
|
||||
|
||||
@ -80,7 +79,7 @@ export function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = fal
|
||||
dialogBoxCreate(txt);
|
||||
} else if (augCosts.moneyCost === 0 || Player.money >= augCosts.moneyCost) {
|
||||
const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);
|
||||
if (aug.name == AugmentationNames.NeuroFluxGovernor) {
|
||||
if (aug.name == AugmentationName.NeuroFluxGovernor) {
|
||||
queuedAugmentation.level = aug.getLevel();
|
||||
}
|
||||
Player.queuedAugmentations.push(queuedAugmentation);
|
||||
@ -138,11 +137,11 @@ export const getFactionAugmentationsFiltered = (faction: Faction): string[] => {
|
||||
let augs = Object.values(StaticAugmentations);
|
||||
|
||||
// Remove special augs
|
||||
augs = augs.filter((a) => !a.isSpecial && a.name !== AugmentationNames.CongruityImplant);
|
||||
augs = augs.filter((a) => !a.isSpecial && a.name !== AugmentationName.CongruityImplant);
|
||||
|
||||
if (Player.bitNodeN === 2) {
|
||||
// TRP is not available outside of BN2 for Gangs
|
||||
augs.push(StaticAugmentations[AugmentationNames.TheRedPill]);
|
||||
augs.push(StaticAugmentations[AugmentationName.TheRedPill]);
|
||||
}
|
||||
|
||||
const rng = SFC32RNG(`BN${Player.bitNodeN}.${Player.sourceFileLvl(Player.bitNodeN)}`);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { FactionNames } from "./data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
import { Router } from "../ui/GameRoot";
|
||||
import { Page } from "../ui/Router";
|
||||
import { Option } from "./ui/Option";
|
||||
@ -62,7 +62,7 @@ export class FactionInfo {
|
||||
/** A map of all factions and associated info to them. */
|
||||
export const FactionInfos: Record<string, FactionInfo> = {
|
||||
// Endgame
|
||||
[FactionNames.Illuminati]: new FactionInfo({
|
||||
[FactionName.Illuminati]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And
|
||||
@ -73,13 +73,13 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
offerFieldWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.Daedalus]: new FactionInfo({
|
||||
[FactionName.Daedalus]: new FactionInfo({
|
||||
infoText: <>Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.TheCovenant]: new FactionInfo({
|
||||
[FactionName.TheCovenant]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
Surrender yourself. Give up your empty individuality to become part of something great, something eternal.
|
||||
@ -94,11 +94,11 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
}),
|
||||
|
||||
// Megacorporations, each forms its own faction
|
||||
[FactionNames.ECorp]: new FactionInfo({
|
||||
[FactionName.ECorp]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
{FactionNames.ECorp}'s mission is simple: to connect the world of today with the technology of tomorrow. With
|
||||
our wide range of Internet-related software and commercial hardware, {FactionNames.ECorp} makes the world's
|
||||
{FactionName.ECorp}'s mission is simple: to connect the world of today with the technology of tomorrow. With our
|
||||
wide range of Internet-related software and commercial hardware, {FactionName.ECorp} makes the world's
|
||||
information universally accessible.
|
||||
</>
|
||||
),
|
||||
@ -108,15 +108,15 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.MegaCorp]: new FactionInfo({
|
||||
[FactionName.MegaCorp]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
{FactionNames.MegaCorp} does what no other dares to do. We imagine. We create. We invent. We create what others
|
||||
{FactionName.MegaCorp} does what no other dares to do. We imagine. We create. We invent. We create what others
|
||||
have never even dreamed of. Our work fills the world's needs for food, water, power, and transportation on an
|
||||
unprecedented scale, in ways that no other company can.
|
||||
<br />
|
||||
<br />
|
||||
In our labs and factories and on the ground with customers, {FactionNames.MegaCorp} is ushering in a new era for
|
||||
In our labs and factories and on the ground with customers, {FactionName.MegaCorp} is ushering in a new era for
|
||||
the world.
|
||||
</>
|
||||
),
|
||||
@ -126,7 +126,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.BachmanAssociates]: new FactionInfo({
|
||||
[FactionName.BachmanAssociates]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
Where Law and Business meet - that's where we are.
|
||||
@ -141,7 +141,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.BladeIndustries]: new FactionInfo({
|
||||
[FactionName.BladeIndustries]: new FactionInfo({
|
||||
infoText: <>Augmentation is Salvation.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
@ -149,7 +149,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.NWO]: new FactionInfo({
|
||||
[FactionName.NWO]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given
|
||||
@ -163,7 +163,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.ClarkeIncorporated]: new FactionInfo({
|
||||
[FactionName.ClarkeIncorporated]: new FactionInfo({
|
||||
infoText: <>The Power of the Genome - Unlocked.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
@ -171,7 +171,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.OmniTekIncorporated]: new FactionInfo({
|
||||
[FactionName.OmniTekIncorporated]: new FactionInfo({
|
||||
infoText: <>Simply put, our mission is to design and build robots that make a difference.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
@ -179,11 +179,11 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.FourSigma]: new FactionInfo({
|
||||
[FactionName.FourSigma]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by
|
||||
deep learning and innovative ideas. And improved by iteration. That's {FactionNames.FourSigma}.
|
||||
deep learning and innovative ideas. And improved by iteration. That's {FactionName.FourSigma}.
|
||||
</>
|
||||
),
|
||||
offerHackingWork: true,
|
||||
@ -192,7 +192,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
keepOnInstall: true,
|
||||
}),
|
||||
|
||||
[FactionNames.KuaiGongInternational]: new FactionInfo({
|
||||
[FactionName.KuaiGongInternational]: new FactionInfo({
|
||||
infoText: <>Dream big. Work hard. Make history.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
@ -201,7 +201,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
}),
|
||||
|
||||
// Other Corporations
|
||||
[FactionNames.FulcrumSecretTechnologies]: new FactionInfo({
|
||||
[FactionName.FulcrumSecretTechnologies]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it
|
||||
@ -214,7 +214,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
}),
|
||||
|
||||
// Hacker groups
|
||||
[FactionNames.BitRunners]: new FactionInfo({
|
||||
[FactionName.BitRunners]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all
|
||||
@ -230,7 +230,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
offerHackingWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.TheBlackHand]: new FactionInfo({
|
||||
[FactionName.TheBlackHand]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power.
|
||||
@ -246,7 +246,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
}),
|
||||
|
||||
// prettier-ignore
|
||||
[FactionNames.NiteSec]: new FactionInfo({
|
||||
[FactionName.NiteSec]: new FactionInfo({
|
||||
infoText:(<>
|
||||
{" __..__ "}<br />
|
||||
{" _.nITESECNIt. "}<br />
|
||||
@ -291,77 +291,71 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
}),
|
||||
|
||||
// City factions, essentially governments
|
||||
[FactionNames.Aevum]: new FactionInfo({
|
||||
[FactionName.Aevum]: new FactionInfo({
|
||||
infoText: <>The Silicon City.</>,
|
||||
enemies: [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],
|
||||
enemies: [FactionName.Chongqing, FactionName.NewTokyo, FactionName.Ishima, FactionName.Volhaven],
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
[FactionNames.Chongqing]: new FactionInfo({
|
||||
[FactionName.Chongqing]: new FactionInfo({
|
||||
infoText: <>Serve the People.</>,
|
||||
enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],
|
||||
enemies: [FactionName.Sector12, FactionName.Aevum, FactionName.Volhaven],
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
[FactionNames.Ishima]: new FactionInfo({
|
||||
[FactionName.Ishima]: new FactionInfo({
|
||||
infoText: <>The East Asian Order of the Future.</>,
|
||||
enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],
|
||||
enemies: [FactionName.Sector12, FactionName.Aevum, FactionName.Volhaven],
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
[FactionNames.NewTokyo]: new FactionInfo({
|
||||
[FactionName.NewTokyo]: new FactionInfo({
|
||||
infoText: <>Asia's World City.</>,
|
||||
enemies: [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],
|
||||
enemies: [FactionName.Sector12, FactionName.Aevum, FactionName.Volhaven],
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
[FactionNames.Sector12]: new FactionInfo({
|
||||
[FactionName.Sector12]: new FactionInfo({
|
||||
infoText: <>The City of the Future.</>,
|
||||
enemies: [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],
|
||||
enemies: [FactionName.Chongqing, FactionName.NewTokyo, FactionName.Ishima, FactionName.Volhaven],
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
[FactionNames.Volhaven]: new FactionInfo({
|
||||
[FactionName.Volhaven]: new FactionInfo({
|
||||
infoText: <>Benefit, Honor, and Glory.</>,
|
||||
enemies: [
|
||||
FactionNames.Chongqing,
|
||||
FactionNames.Sector12,
|
||||
FactionNames.NewTokyo,
|
||||
FactionNames.Aevum,
|
||||
FactionNames.Ishima,
|
||||
],
|
||||
enemies: [FactionName.Chongqing, FactionName.Sector12, FactionName.NewTokyo, FactionName.Aevum, FactionName.Ishima],
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
|
||||
// Criminal Organizations/Gangs
|
||||
[FactionNames.SpeakersForTheDead]: new FactionInfo({
|
||||
[FactionName.SpeakersForTheDead]: new FactionInfo({
|
||||
infoText: <>It is better to reign in Hell than to serve in Heaven.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.TheDarkArmy]: new FactionInfo({
|
||||
[FactionName.TheDarkArmy]: new FactionInfo({
|
||||
infoText: <>The World doesn't care about right or wrong. It only cares about power.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.TheSyndicate]: new FactionInfo({
|
||||
[FactionName.TheSyndicate]: new FactionInfo({
|
||||
infoText: <>Honor holds you back.</>,
|
||||
offerHackingWork: true,
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.Silhouette]: new FactionInfo({
|
||||
[FactionName.Silhouette]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
Corporations have filled the void of power left behind by the collapse of Western government. The issue is
|
||||
@ -376,34 +370,34 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
offerFieldWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.Tetrads]: new FactionInfo({
|
||||
[FactionName.Tetrads]: new FactionInfo({
|
||||
infoText: <>Following the mandate of Heaven and carrying out the way.</>,
|
||||
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.SlumSnakes]: new FactionInfo({
|
||||
infoText: <>{FactionNames.SlumSnakes} rule!</>,
|
||||
[FactionName.SlumSnakes]: new FactionInfo({
|
||||
infoText: <>{FactionName.SlumSnakes} rule!</>,
|
||||
|
||||
offerFieldWork: true,
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
|
||||
// Early game factions - factions the player will prestige with early on that don't belong in other categories.
|
||||
[FactionNames.Netburners]: new FactionInfo({
|
||||
[FactionName.Netburners]: new FactionInfo({
|
||||
infoText: <>{"~~//*>H4CK||3T 8URN3R5**>?>\\~~"}</>,
|
||||
offerHackingWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.TianDiHui]: new FactionInfo({
|
||||
[FactionName.TianDiHui]: new FactionInfo({
|
||||
infoText: <>Obey Heaven and work righteously.</>,
|
||||
offerHackingWork: true,
|
||||
|
||||
offerSecurityWork: true,
|
||||
}),
|
||||
|
||||
[FactionNames.CyberSec]: new FactionInfo({
|
||||
[FactionName.CyberSec]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy
|
||||
@ -415,14 +409,14 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
}),
|
||||
|
||||
// Special Factions
|
||||
[FactionNames.Bladeburners]: new FactionInfo({
|
||||
[FactionName.Bladeburners]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
It's too bad they won't live. But then again, who does?
|
||||
<br />
|
||||
<br />
|
||||
Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions.{" "}
|
||||
Completing {FactionNames.Bladeburners} contracts/operations will increase your reputation.
|
||||
Note that for this faction, reputation can only be gained through {FactionName.Bladeburners} actions. Completing{" "}
|
||||
{FactionName.Bladeburners} contracts/operations will increase your reputation.
|
||||
</>
|
||||
),
|
||||
|
||||
@ -438,7 +432,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
},
|
||||
}),
|
||||
|
||||
[FactionNames.ChurchOfTheMachineGod]: new FactionInfo({
|
||||
[FactionName.ChurchOfTheMachineGod]: new FactionInfo({
|
||||
// prettier-ignore
|
||||
infoText:(<>
|
||||
{" `` "}<br />
|
||||
@ -489,7 +483,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
);
|
||||
},
|
||||
}),
|
||||
[FactionNames.ShadowsOfAnarchy]: new FactionInfo({
|
||||
[FactionName.ShadowsOfAnarchy]: new FactionInfo({
|
||||
infoText: (
|
||||
<>
|
||||
The government is ruled by the corporations that we have allowed to consume it. To release the world from its
|
||||
@ -499,7 +493,7 @@ export const FactionInfos: Record<string, FactionInfo> = {
|
||||
special: true,
|
||||
keepOnInstall: true,
|
||||
assignment: (): React.ReactElement => {
|
||||
return <Typography>{FactionNames.ShadowsOfAnarchy} can only gain reputation by infiltrating.</Typography>;
|
||||
return <Typography>{FactionName.ShadowsOfAnarchy} can only gain reputation by infiltrating.</Typography>;
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
@ -3,7 +3,7 @@ import React from "react";
|
||||
|
||||
import { StaticAugmentations } from "../../Augmentation/StaticAugmentations";
|
||||
import { getGenericAugmentationPriceMultiplier } from "../../Augmentation/AugmentationHelpers";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName, FactionName } from "@enums";
|
||||
import { PurchasableAugmentations } from "../../Augmentation/ui/PurchasableAugmentations";
|
||||
import { PurchaseAugmentationsOrderSetting } from "../../Settings/SettingEnums";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
@ -11,7 +11,6 @@ import { Player } from "@player";
|
||||
import { formatBigNumber } from "../../ui/formatNumber";
|
||||
import { Favor } from "../../ui/React/Favor";
|
||||
import { Reputation } from "../../ui/React/Reputation";
|
||||
import { FactionNames } from "../data/FactionNames";
|
||||
import { Faction } from "../Faction";
|
||||
import { getFactionAugmentationsFiltered, hasAugmentationPrereqs, purchaseAugmentation } from "../FactionHelpers";
|
||||
import { CONSTANTS } from "../../Constants";
|
||||
@ -121,13 +120,13 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
|
||||
const augs = getAugsSorted();
|
||||
const purchasable = augs.filter(
|
||||
(aug: string) =>
|
||||
aug === AugmentationNames.NeuroFluxGovernor ||
|
||||
aug === AugmentationName.NeuroFluxGovernor ||
|
||||
(!Player.augmentations.some((a) => a.name === aug) && !Player.queuedAugmentations.some((a) => a.name === aug)),
|
||||
);
|
||||
const owned = augs.filter((aug: string) => !purchasable.includes(aug));
|
||||
|
||||
const multiplierComponent =
|
||||
props.faction.name !== FactionNames.ShadowsOfAnarchy ? (
|
||||
props.faction.name !== FactionName.ShadowsOfAnarchy ? (
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
@ -144,7 +143,7 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
This price multiplier increases for each {FactionNames.ShadowsOfAnarchy} augmentation already purchased. The
|
||||
This price multiplier increases for each {FactionName.ShadowsOfAnarchy} augmentation already purchased. The
|
||||
multiplier is NOT reset when installing augmentations.
|
||||
</Typography>
|
||||
}
|
||||
@ -183,7 +182,7 @@ export function AugmentationsPage(props: IProps): React.ReactElement {
|
||||
<Box
|
||||
sx={{
|
||||
display: "grid",
|
||||
gridTemplateColumns: `repeat(${props.faction.name === FactionNames.ShadowsOfAnarchy ? "2" : "3"}, 1fr)`,
|
||||
gridTemplateColumns: `repeat(${props.faction.name === FactionName.ShadowsOfAnarchy ? "2" : "3"}, 1fr)`,
|
||||
justifyItems: "center",
|
||||
my: 1,
|
||||
}}
|
||||
|
@ -6,7 +6,7 @@ import { Player } from "@player";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Button from "@mui/material/Button";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
import { FactionNames } from "../data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
|
||||
interface IProps {
|
||||
open: boolean;
|
||||
@ -27,7 +27,7 @@ export function CreateGangModal(props: IProps): React.ReactElement {
|
||||
"is not as important.";
|
||||
|
||||
function isHacking(): boolean {
|
||||
return [FactionNames.NiteSec as string, FactionNames.TheBlackHand as string].includes(props.facName);
|
||||
return [FactionName.NiteSec as string, FactionName.TheBlackHand as string].includes(props.facName);
|
||||
}
|
||||
|
||||
function createGang(): void {
|
||||
|
@ -21,10 +21,9 @@ import { Player } from "@player";
|
||||
|
||||
import { Typography, Button } from "@mui/material";
|
||||
import { CovenantPurchasesRoot } from "../../PersonObjects/Sleeve/ui/CovenantPurchasesRoot";
|
||||
import { FactionNames } from "../data/FactionNames";
|
||||
import { FactionName, FactionWorkType } from "@enums";
|
||||
import { GangButton } from "./GangButton";
|
||||
import { FactionWork } from "../../Work/FactionWork";
|
||||
import { FactionWorkType } from "../../Enums";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
|
||||
interface IProps {
|
||||
@ -111,7 +110,7 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
|
||||
const favorToDonate = Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);
|
||||
const canDonate = faction.favor >= favorToDonate;
|
||||
|
||||
const canPurchaseSleeves = faction.name === FactionNames.TheCovenant && Player.bitNodeN === 10;
|
||||
const canPurchaseSleeves = faction.name === FactionName.TheCovenant && Player.bitNodeN === 10;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -5,7 +5,7 @@ import { Player } from "@player";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { formatFavor, formatReputation } from "../../ui/formatNumber";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { FactionNames } from "../data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
import { Faction } from "../Faction";
|
||||
import { getFactionAugmentationsFiltered, joinFaction } from "../FactionHelpers";
|
||||
import { Factions } from "../Factions";
|
||||
@ -175,7 +175,7 @@ export function FactionsRoot(): React.ReactElement {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const allFactions = Object.values(FactionNames).map((faction) => faction as string);
|
||||
const allFactions = Object.values(FactionName).map((faction) => faction as string);
|
||||
const allJoinedFactions = [...Player.factions];
|
||||
allJoinedFactions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));
|
||||
const invitations = Player.factionInvitations;
|
||||
|
@ -18,7 +18,8 @@ import { StyleEditorButton } from "../../Themes/ui/StyleEditorButton";
|
||||
import { ThemeEditorButton } from "../../Themes/ui/ThemeEditorButton";
|
||||
import { ConfirmationModal } from "../../ui/React/ConfirmationModal";
|
||||
import { DeleteGameButton } from "../../ui/React/DeleteGameButton";
|
||||
import { SnackbarEvents, ToastVariant } from "../../ui/React/Snackbar";
|
||||
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||
import { ToastVariant } from "@enums";
|
||||
import { SoftResetButton } from "../../ui/React/SoftResetButton";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { Page } from "../../ui/Router";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FactionNames } from "../Faction/data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
import { Reviver } from "../utils/JSONReviver";
|
||||
|
||||
interface GangTerritory {
|
||||
@ -7,31 +7,31 @@ interface GangTerritory {
|
||||
}
|
||||
|
||||
export let AllGangs: Record<string, GangTerritory> = {
|
||||
[FactionNames.SlumSnakes]: {
|
||||
[FactionName.SlumSnakes]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.Tetrads]: {
|
||||
[FactionName.Tetrads]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.TheSyndicate]: {
|
||||
[FactionName.TheSyndicate]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.TheDarkArmy]: {
|
||||
[FactionName.TheDarkArmy]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.SpeakersForTheDead]: {
|
||||
[FactionName.SpeakersForTheDead]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.NiteSec]: {
|
||||
[FactionName.NiteSec]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.TheBlackHand]: {
|
||||
[FactionName.TheBlackHand]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
@ -39,31 +39,31 @@ export let AllGangs: Record<string, GangTerritory> = {
|
||||
|
||||
export function resetGangs(): void {
|
||||
AllGangs = {
|
||||
[FactionNames.SlumSnakes]: {
|
||||
[FactionName.SlumSnakes]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.Tetrads]: {
|
||||
[FactionName.Tetrads]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.TheSyndicate]: {
|
||||
[FactionName.TheSyndicate]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.TheDarkArmy]: {
|
||||
[FactionName.TheDarkArmy]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.SpeakersForTheDead]: {
|
||||
[FactionName.SpeakersForTheDead]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.NiteSec]: {
|
||||
[FactionName.NiteSec]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
[FactionNames.TheBlackHand]: {
|
||||
[FactionName.TheBlackHand]: {
|
||||
power: 1,
|
||||
territory: 1 / 7,
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { CONSTANTS } from "../../Constants";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
|
||||
export const GangConstants = {
|
||||
// Respect is divided by this to get rep gain
|
||||
@ -10,13 +10,13 @@ export const GangConstants = {
|
||||
AscensionMultiplierRatio: 0.15,
|
||||
// Names of possible Gangs
|
||||
Names: [
|
||||
FactionNames.SlumSnakes,
|
||||
FactionNames.Tetrads,
|
||||
FactionNames.TheSyndicate,
|
||||
FactionNames.TheDarkArmy,
|
||||
FactionNames.SpeakersForTheDead,
|
||||
FactionNames.NiteSec,
|
||||
FactionNames.TheBlackHand,
|
||||
FactionName.SlumSnakes,
|
||||
FactionName.Tetrads,
|
||||
FactionName.TheSyndicate,
|
||||
FactionName.TheDarkArmy,
|
||||
FactionName.SpeakersForTheDead,
|
||||
FactionName.NiteSec,
|
||||
FactionName.TheBlackHand,
|
||||
] as string[],
|
||||
GangKarmaRequirement: -54000,
|
||||
/** Normal number of game cycles processed at once (2 seconds) */
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
export const PowerMultiplier: Record<string, number | undefined> = {
|
||||
[FactionNames.SlumSnakes]: 1,
|
||||
[FactionNames.Tetrads]: 2,
|
||||
[FactionNames.TheSyndicate]: 2,
|
||||
[FactionNames.TheDarkArmy]: 2,
|
||||
[FactionNames.SpeakersForTheDead]: 5,
|
||||
[FactionNames.NiteSec]: 2,
|
||||
[FactionNames.TheBlackHand]: 5,
|
||||
[FactionName.SlumSnakes]: 1,
|
||||
[FactionName.Tetrads]: 2,
|
||||
[FactionName.TheSyndicate]: 2,
|
||||
[FactionName.TheDarkArmy]: 2,
|
||||
[FactionName.SpeakersForTheDead]: 5,
|
||||
[FactionName.NiteSec]: 2,
|
||||
[FactionName.TheBlackHand]: 5,
|
||||
};
|
||||
|
@ -7,6 +7,7 @@ export interface IMults {
|
||||
cha?: number;
|
||||
}
|
||||
|
||||
// Does not need an enum helper, not in an enums file
|
||||
export enum UpgradeType {
|
||||
Weapon = "w",
|
||||
Armor = "a",
|
||||
|
@ -15,7 +15,7 @@ import Typography from "@mui/material/Typography";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Button from "@mui/material/Button";
|
||||
import { SelectChangeEvent } from "@mui/material/Select";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { FactionName } from "@enums";
|
||||
import { companiesMetadata } from "../../Company/data/CompaniesMetadata";
|
||||
|
||||
interface IProps {
|
||||
@ -29,7 +29,7 @@ const companiesMap: Record<string, string> = {};
|
||||
|
||||
export function HacknetUpgradeElem(props: IProps): React.ReactElement {
|
||||
const [selectedServer, setSelectedServer] = useState(
|
||||
serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionNames.ECorp.toLowerCase(),
|
||||
serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionName.ECorp.toLowerCase(),
|
||||
);
|
||||
function changeTargetServer(event: SelectChangeEvent): void {
|
||||
setSelectedServer(event.target.value);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Player } from "@player";
|
||||
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
|
||||
import { LocationsMetadata } from "../../Locations/data/LocationsMetadata";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Faction } from "../../Faction/Faction";
|
||||
|
||||
export function calculateSellInformationCashReward(reward: number, maxLevel: number, difficulty: number): number {
|
||||
@ -12,7 +12,7 @@ export function calculateSellInformationCashReward(reward: number, maxLevel: num
|
||||
Math.pow(difficulty, 3) *
|
||||
3e3 *
|
||||
levelBonus *
|
||||
(Player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.5 : 1) *
|
||||
(Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 1.5 : 1) *
|
||||
BitNodeMultipliers.InfiltrationMoney
|
||||
);
|
||||
}
|
||||
@ -25,7 +25,7 @@ export function calculateTradeInformationRepReward(reward: number, maxLevel: num
|
||||
Math.pow(difficulty, 1.2) *
|
||||
30 *
|
||||
levelBonus *
|
||||
(Player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.5 : 1) *
|
||||
(Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 1.5 : 1) *
|
||||
BitNodeMultipliers.InfiltrationRep
|
||||
);
|
||||
}
|
||||
@ -38,6 +38,6 @@ export function calculateInfiltratorsRepReward(faction: Faction, difficulty: num
|
||||
const baseRepGain = (difficulty / maxStartingSecurityLevel) * 5000;
|
||||
|
||||
return (
|
||||
baseRepGain * (Player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 2 : 1) * (1 + faction.favor / 100)
|
||||
baseRepGain * (Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 2 : 1) * (1 + faction.favor / 100)
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Paper, Typography } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
import { random } from "../utils";
|
||||
@ -35,7 +35,7 @@ export function BackwardGame(props: IMinigameProps): React.ReactElement {
|
||||
const timer = difficulty.timer;
|
||||
const [answer] = useState(makeAnswer(difficulty));
|
||||
const [guess, setGuess] = useState("");
|
||||
const hasAugment = Player.hasAugmentation(AugmentationNames.ChaosOfDionysus, true);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationName.ChaosOfDionysus, true);
|
||||
|
||||
function ignorableKeyboardEvent(event: KeyboardEvent): boolean {
|
||||
return event.key === KEY.BACKSPACE || (event.shiftKey && event.key === "Shift") || event.ctrlKey || event.altKey;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Paper, Typography } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
import { random } from "../utils";
|
||||
@ -32,7 +32,7 @@ const difficulties: {
|
||||
function generateLeftSide(difficulty: Difficulty): string {
|
||||
let str = "";
|
||||
const options = [KEY.OPEN_BRACKET, KEY.LESS_THAN, KEY.OPEN_PARENTHESIS, KEY.OPEN_BRACE];
|
||||
if (Player.hasAugmentation(AugmentationNames.WisdomOfAthena, true)) {
|
||||
if (Player.hasAugmentation(AugmentationName.WisdomOfAthena, true)) {
|
||||
options.splice(0, 1);
|
||||
}
|
||||
const length = random(difficulty.min, difficulty.max);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Paper, Typography } from "@mui/material";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
@ -46,7 +46,7 @@ export function BribeGame(props: IMinigameProps): React.ReactElement {
|
||||
let upColor = defaultColor;
|
||||
let downColor = defaultColor;
|
||||
let choiceColor = defaultColor;
|
||||
const hasAugment = Player.hasAugmentation(AugmentationNames.BeautyOfAphrodite, true);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationName.BeautyOfAphrodite, true);
|
||||
|
||||
if (hasAugment) {
|
||||
const upIndex = index + 1 >= choices.length ? 0 : index + 1;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Paper, Typography } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import {
|
||||
downArrowSymbol,
|
||||
@ -41,7 +41,7 @@ export function CheatCodeGame(props: IMinigameProps): React.ReactElement {
|
||||
const timer = difficulty.timer;
|
||||
const [code] = useState(generateCode(difficulty));
|
||||
const [index, setIndex] = useState(0);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationNames.TrickeryOfHermes, true);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationName.TrickeryOfHermes, true);
|
||||
|
||||
function press(this: Document, event: KeyboardEvent): void {
|
||||
event.preventDefault();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Paper, Typography, Box } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
@ -45,7 +45,7 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {
|
||||
const [currentAnswerIndex, setCurrentAnswerIndex] = useState(0);
|
||||
const [pos, setPos] = useState([0, 0]);
|
||||
|
||||
const hasAugment = Player.hasAugmentation(AugmentationNames.FloodOfPoseidon, true);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationName.FloodOfPoseidon, true);
|
||||
function press(this: Document, event: KeyboardEvent): void {
|
||||
event.preventDefault();
|
||||
const move = [0, 0];
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Button, Container, Paper, Typography } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { Page } from "../../ui/Router";
|
||||
import { Player } from "@player";
|
||||
@ -92,7 +92,7 @@ export function Game(props: IProps): React.ReactElement {
|
||||
// it's clear they're not meant to
|
||||
const damage = options?.automated
|
||||
? Player.hp.current
|
||||
: props.StartingDifficulty * 3 * (Player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 0.5 : 1);
|
||||
: props.StartingDifficulty * 3 * (Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 0.5 : 1);
|
||||
if (Player.takeDamage(damage)) {
|
||||
Router.toPage(Page.City);
|
||||
return;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Paper } from "@mui/material";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import { ProgressBar } from "../../ui/React/Progress";
|
||||
|
||||
@ -14,7 +14,7 @@ interface IProps {
|
||||
export function GameTimer(props: IProps): React.ReactElement {
|
||||
const [v, setV] = useState(100);
|
||||
const totalMillis =
|
||||
(!props.ignoreAugment_WKSharmonizer && Player.hasAugmentation(AugmentationNames.WKSharmonizer, true) ? 1.3 : 1) *
|
||||
(!props.ignoreAugment_WKSharmonizer && Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 1.3 : 1) *
|
||||
props.millis;
|
||||
|
||||
const tick = 200;
|
||||
|
@ -2,7 +2,7 @@ import { Close, Flag, Report } from "@mui/icons-material";
|
||||
import { Box, Paper, Typography } from "@mui/material";
|
||||
import { uniqueId } from "lodash";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
|
||||
import { AugmentationName } from "@enums";
|
||||
import { Player } from "@player";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
@ -40,7 +40,7 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement {
|
||||
const [answer, setAnswer] = useState(generateEmptyField(difficulty));
|
||||
const [pos, setPos] = useState([0, 0]);
|
||||
const [memoryPhase, setMemoryPhase] = useState(true);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationNames.HuntOfArtemis, true);
|
||||
const hasAugment = Player.hasAugmentation(AugmentationName.HuntOfArtemis, true);
|
||||
function press(this: Document, event: KeyboardEvent): void {
|
||||
event.preventDefault();
|
||||
if (memoryPhase) return;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user