ENUMS: Initial Enum Helper rework + Reorganization (#596)

This commit is contained in:
Snarling
2023-06-12 00:34:20 -04:00
committed by GitHub
parent 6ed8ea9796
commit 6732549196
224 changed files with 2126 additions and 2171 deletions
+4 -6
View File
@@ -1,8 +1,8 @@
import React from "react";
import { constructorsForReviver, Generic_toJSON, Generic_fromJSON, IReviverValue } from "../utils/JSONReviver";
import { CONSTANTS } from "../Constants";
import { LocationName } from "../Enums";
import { formatExp } from "../ui/formatNumber";
import { ClassType, GymType, LocationName, UniversityClassType } from "@enums";
import { dialogBoxCreate } from "../ui/React/DialogBox";
import { Money } from "../ui/React/Money";
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
@@ -10,10 +10,8 @@ import { Player } from "@player";
import { calculateClassEarnings as calculateClassEarningsRate } from "./Formulas";
import { Work, WorkType } from "./Work";
import { applyWorkStats, newWorkStats, sumWorkStats, WorkStats } from "./WorkStats";
import { GymType, UniversityClassType } from "../Enums";
import { checkEnum, findEnumMember } from "../utils/helpers/enum";
export type ClassType = UniversityClassType | GymType;
import { findEnumMember } from "../utils/helpers/enum";
import { isMember } from "../utils/EnumHelper";
export interface Class {
type: ClassType;
@@ -94,7 +92,7 @@ export class ClassWork extends Work {
}
isGym(): boolean {
return checkEnum(GymType, this.classType);
return isMember("GymType", this.classType);
}
getClass(): Class {