mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 07:07:50 +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:
+4
-11
@@ -1,20 +1,13 @@
|
||||
/** Construct a type using the values from an object. Requires object to be defined "as const" */
|
||||
export type ValuesFrom<T> = T[keyof T];
|
||||
|
||||
/**
|
||||
* Status object for functions that return a boolean indicating success/failure
|
||||
* and an optional message
|
||||
*/
|
||||
/** Status object for functions that return a boolean indicating success/failure
|
||||
* and an optional message */
|
||||
export interface IReturnStatus {
|
||||
res: boolean;
|
||||
msg?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the minimum and maximum values for a range.
|
||||
/** Defines the minimum and maximum values for a range.
|
||||
* It is up to the consumer if these values are inclusive or exclusive.
|
||||
* It is up to the implementor to ensure max > min.
|
||||
*/
|
||||
* It is up to the implementor to ensure max > min. */
|
||||
export interface IMinMaxRange {
|
||||
/** Value by which the bounds are to be divided for the final range */
|
||||
divisor?: number;
|
||||
|
||||
Reference in New Issue
Block a user