Merge branch 'dev' into issues/2308

This commit is contained in:
hydroflame
2022-03-20 14:22:32 -04:00
committed by GitHub
69 changed files with 1851 additions and 1883 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import { use } from "../../ui/Context";
import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
import { KEY } from "../../utils/helpers/keyCodes";
import { FactionNames } from "../data/FactionNames";
interface IProps {
open: boolean;
@@ -28,7 +29,7 @@ export function CreateGangModal(props: IProps): React.ReactElement {
"is not as important.";
function isHacking(): boolean {
return ["NiteSec", "The Black Hand"].includes(props.facName);
return [FactionNames.NiteSec as string, FactionNames.TheBlackHand as string].includes(props.facName);
}
function createGang(): void {
+4 -12
View File
@@ -21,6 +21,8 @@ import { CreateGangModal } from "./CreateGangModal";
import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
import { CovenantPurchasesRoot } from "../../PersonObjects/Sleeve/ui/CovenantPurchasesRoot";
import { FactionNames } from "../data/FactionNames";
import { GangConstants } from "../../Gang/data/Constants";
type IProps = {
faction: Faction;
@@ -50,16 +52,6 @@ const augmentationsInfo =
"your abilities.";
const sleevePurchasesInfo = "Purchase Duplicate Sleeves and upgrades. These are permanent!";
const GangNames = [
"Slum Snakes",
"Tetrads",
"The Syndicate",
"The Dark Army",
"Speakers for the Dead",
"NiteSec",
"The Black Hand",
];
interface IMainProps {
faction: Faction;
rerender: () => void;
@@ -111,9 +103,9 @@ 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 === "The Covenant" && player.bitNodeN === 10;
const canPurchaseSleeves = faction.name === FactionNames.TheCovenant && player.bitNodeN === 10;
let canAccessGang = player.canAccessGang() && GangNames.includes(faction.name);
let canAccessGang = player.canAccessGang() && GangConstants.Names.includes(faction.name);
if (player.inGang()) {
if (player.getGangName() !== faction.name) {
canAccessGang = false;