BLADEBURNER: Remove unused code (#1368)

This commit is contained in:
catloversg 2024-06-09 03:51:05 +07:00 committed by GitHub
parent abcd6c545a
commit b8f03cb50b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

@ -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);

@ -26,7 +26,7 @@ class EnumHelper<EnumObj extends object, EnumMember extends Member<EnumObj> & 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);