mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 02:32:55 +02:00
MISC: A bunch of enums stuff. (#212)
* Some game enums moved to utils/enums. Others can eventually be moved there as well. * findEnumMember function for performing fuzzy matching of player input with enum members, without needing separate fuzzy functions for every enum. * Also used findEnumMember for safely loading save games (allows case changes in enum values) * Changed capitalization on some enums. * BREAKING: removed classGains work formulas function * Split ClassType enum into UniversityClassType and GymType. * Added universityGains and gymGains work formulas functions * Provided the new split enums to the player on ns.enums.
This commit is contained in:
@@ -66,7 +66,7 @@ import { NetscriptSingularity } from "./NetscriptFunctions/Singularity";
|
||||
|
||||
import { dialogBoxCreate } from "./ui/React/DialogBox";
|
||||
import { SnackbarEvents, ToastVariant } from "./ui/React/Snackbar";
|
||||
import { checkEnum } from "./utils/helpers/checkEnum";
|
||||
import { checkEnum } from "./utils/helpers/enum";
|
||||
|
||||
import { Flags } from "./NetscriptFunctions/Flags";
|
||||
import { calculateIntelligenceBonus } from "./PersonObjects/formulas/intelligence";
|
||||
@@ -77,16 +77,16 @@ import { INetscriptExtra } from "./NetscriptFunctions/Extra";
|
||||
import { ScriptDeath } from "./Netscript/ScriptDeath";
|
||||
import { getBitNodeMultipliers } from "./BitNode/BitNode";
|
||||
import { assert, arrayAssert, stringAssert, objectAssert } from "./utils/helpers/typeAssertion";
|
||||
import { CompanyPosNames, CrimeType } from "./utils/WorkType";
|
||||
import { CompanyPosNames, CrimeType, GymType, UniversityClassType } from "./utils/enums";
|
||||
import { cloneDeep } from "lodash";
|
||||
import { FactionWorkType } from "./Work/data/FactionWorkType";
|
||||
import { ClassType } from "./Work/ClassWork";
|
||||
import { FactionWorkType } from "./utils/enums";
|
||||
|
||||
export const enums: NSEnums = {
|
||||
toast: ToastVariant,
|
||||
CrimeType,
|
||||
FactionWorkType,
|
||||
ClassType,
|
||||
GymType,
|
||||
UniversityClassType,
|
||||
CompanyPosNames,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user