mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 11:27:04 +02:00
ENUMS: Initial Enum Helper rework + Reorganization (#596)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user