mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 10:12:53 +02:00
TYPESAFETY: Strict internal typing for AugmentationName (#608)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user