From b8f03cb50b4669d8fbadf0da8219757a99c1285d Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Sun, 9 Jun 2024 03:51:05 +0700 Subject: [PATCH] BLADEBURNER: Remove unused code (#1368) --- src/Bladeburner/ui/ContractElem.tsx | 3 --- src/utils/EnumHelper.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Bladeburner/ui/ContractElem.tsx b/src/Bladeburner/ui/ContractElem.tsx index 8ad66dfc7..d92423f6d 100644 --- a/src/Bladeburner/ui/ContractElem.tsx +++ b/src/Bladeburner/ui/ContractElem.tsx @@ -10,7 +10,6 @@ import { Autolevel } from "./Autolevel"; import { formatBigNumber } from "../../ui/formatNumber"; import { Paper, Typography } from "@mui/material"; import { useRerender } from "../../ui/React/hooks"; -import { getEnumHelper } from "../../utils/EnumHelper"; import { ActionHeader } from "./ActionHeader"; interface ContractElemProps { @@ -20,8 +19,6 @@ interface ContractElemProps { export function ContractElem({ bladeburner, action }: ContractElemProps): React.ReactElement { const rerender = useRerender(); - // Temp special return - if (!getEnumHelper("BladeContractName").isMember(action.name)) return <>; const isActive = action.name === bladeburner.action?.name; const actionTime = action.getActionTime(bladeburner, Player); diff --git a/src/utils/EnumHelper.ts b/src/utils/EnumHelper.ts index 97f657441..350574cac 100644 --- a/src/utils/EnumHelper.ts +++ b/src/utils/EnumHelper.ts @@ -26,7 +26,7 @@ class EnumHelper & st this.valueSet = new Set(this.valueArray); this.fuzzMap = new Map(this.valueArray.map((val) => [val.toLowerCase().replace(/[ -]+/g, ""), val])); } - /** Provide a boolean indication for whether a */ + /** Provide a boolean indication for whether a value is a member of an enum */ isMember(toValidate: unknown): toValidate is EnumMember { // Asserting that Set.has actually takes in arbitrary values, which it does. return (this.valueSet.has as (value: unknown) => boolean)(toValidate);