mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-30 01:47:33 +01:00
dc9b1050bf
Includes my change and a bunch of prior changes
1.1 KiB
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.