bitburner-src/markdown/bitburner.hackingformulas.growthreads.md
David Walker dc9b1050bf Result of npm run doc
Includes my change and a bunch of prior changes
2023-02-17 00:14:20 -08:00

1.1 KiB

Home > bitburner > HackingFormulas > growThreads

HackingFormulas.growThreads() method

Calculate how many threads it will take to grow server to targetMoney. Starting money is server.moneyAvailable.

Signature:

growThreads(server: Server, player: Person, targetMoney: number, cores?: number): number;

Parameters

Parameter Type Description
server Server Server info, typically from getServer
player Person Player info, typically from getPlayer
targetMoney number Desired final money, capped to server's moneyMax
cores number (Optional) Number of cores on the computer that will execute grow.

Returns:

number

The calculated grow threads as an integer, rounded up.