TYPESAFETY: Strict internal typing for AugmentationName (#608)

This commit is contained in:
Snarling
2023-06-16 17:52:42 -04:00
committed by GitHub
parent 12b5c00d14
commit a4b826683e
70 changed files with 2649 additions and 3221 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ import { Server, IConstructorParams } from "./Server";
import { BaseServer } from "./BaseServer";
import { calculateServerGrowth } from "./formulas/grow";
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { CONSTANTS } from "../Constants";
import { Player } from "@player";
import { CompletedProgramName, LiteratureName } from "@enums";
@@ -66,7 +66,7 @@ export function numCycleForGrowth(server: IServer, growth: number, cores = 1): n
(Math.log(ajdGrowthRate) *
Player.mults.hacking_grow *
serverGrowthPercentage *
BitNodeMultipliers.ServerGrowthRate *
currentNodeMults.ServerGrowthRate *
coreBonus);
return cycles;
@@ -105,7 +105,7 @@ export function numCycleForGrowthCorrected(
const serverGrowthPercentage = server.serverGrowth / 100.0;
const coreMultiplier = 1 + (cores - 1) / 16;
const threadMultiplier =
serverGrowthPercentage * person.mults.hacking_grow * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;
serverGrowthPercentage * person.mults.hacking_grow * coreMultiplier * currentNodeMults.ServerGrowthRate;
/* To understand what is done below we need to do some math. I hope the explanation is clear enough.
* First of, the names will be shortened for ease of manipulation: