MISC: Show values of constants in type hints. (#1515)

This commit is contained in:
Tom Prince 2024-07-26 02:56:09 -06:00 committed by GitHub
parent 02538d6953
commit c3dc275d34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 9 additions and 19 deletions

@ -50,4 +50,4 @@ export const BladeburnerConstants = {
HrcHpGain: 2, // HP Gained from Hyperbolic Regeneration chamber
HrcStaminaGain: 1, // Percentage Stamina gained from Hyperbolic Regeneration Chamber
};
} as const;

@ -119,4 +119,4 @@ See 2.6.2 changelog at https://github.com/bitburner-official/bitburner-src/blob/
- Nerf noodle bar
`,
};
} as const;

@ -2,4 +2,4 @@ export const StanekConstants = {
RAMBonus: 0.1,
BaseSize: 9,
MaxSize: 25,
};
} as const;

@ -29,4 +29,4 @@ export const GangConstants = {
minCyclesToProcess: 2000 / CONSTANTS.MilliPerCycle,
/** Maximum number of cycles to process at once during bonus time (5 seconds) */
maxCyclesToProcess: 5000 / CONSTANTS.MilliPerCycle,
};
} as const;

@ -14,7 +14,7 @@ export const HacknetNodeConstants = {
MaxLevel: 200,
MaxRam: 64,
MaxCores: 16,
};
} as const;
export const PurchaseMultipliers: {
[key: string]: number | "MAX" | undefined;
@ -49,4 +49,4 @@ export const HacknetServerConstants = {
MaxRam: 8192,
MaxCores: 128,
MaxCache: 15,
};
} as const;

@ -1,14 +1,4 @@
export const ServerConstants: {
BaseCostFor1GBOfRamHome: number;
BaseCostFor1GBOfRamServer: number;
HomeComputerMaxRam: number;
ServerBaseGrowthIncr: number;
ServerMaxGrowthLog: number;
ServerFortifyAmount: number;
ServerWeakenAmount: number;
PurchasedServerLimit: number;
PurchasedServerMaxRam: number;
} = {
export const ServerConstants = {
// Base RAM costs
BaseCostFor1GBOfRamHome: 32000,
BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM
@ -21,4 +11,4 @@ export const ServerConstants: {
PurchasedServerLimit: 25,
PurchasedServerMaxRam: 1048576, // 2^20
};
} as const;

@ -120,7 +120,7 @@ export function capitalizeEachWord(s: string): string {
.join(" ");
}
export function getNsApiDocumentationUrl(isDevBranch = CONSTANTS.isDevBranch): string {
export function getNsApiDocumentationUrl(isDevBranch: boolean = CONSTANTS.isDevBranch): string {
return `https://github.com/bitburner-official/bitburner-src/blob/${
isDevBranch ? "dev" : "stable"
}/markdown/bitburner.ns.md`;