From 76cc1532a726d472e0584652c81e5f2fe785511b Mon Sep 17 00:00:00 2001 From: zeddrak <57454318+zeddrak@users.noreply.github.com> Date: Mon, 31 Jan 2022 20:15:55 -0800 Subject: [PATCH] Added note to numCycleForGrowthByHackAmt * NOTE: the prehackMoney parameter can be removed and server.moneyMax used in its place. The return value would then give a thread count * that would slowly grow the server more than it is hacked until reaching moneyMax where it would return the correct number of threads. --- src/Server/ServerHelpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Server/ServerHelpers.ts b/src/Server/ServerHelpers.ts index a16b6d1c8..2120bc23b 100644 --- a/src/Server/ServerHelpers.ts +++ b/src/Server/ServerHelpers.ts @@ -140,6 +140,8 @@ export function numCycleForGrowthCorrected(server: Server, targetMoney: number, * This function calculates the number of threads needed to grow a server based on a pre-hack money and hackAmt * (ie, if you're hacking a server with $1e6 moneyAvail for 60%, this function will tell you how many threads to regrow it * PROBABLY the best replacement for the current ns.growthAnalyze + * NOTE: prehackMoney can be removed as a parameter and server.moneyMax used in its place. The return value would then give a thread count + * that would slowly grow the server more than it is hacked until reaching moneyMax where it would return the correct number of threads. * @param server - Server being grown * @param hackAmt - the amount hacked (total, not per thread) - as a decimal (like 0.60 for hacking 60% of available money) * @param prehackMoney - how much money the server had before being hacked (like 200000 for hacking a server that had $200000 on it at time of hacking)