mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
hackAnalyzeThreads will return zero instead of NaN when checking the effect of zero threads on a server with zero cash.
This commit is contained in:
parent
ea0be338e1
commit
17b11f107f
@ -509,6 +509,8 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
|
||||
if (hackAmount < 0 || hackAmount > server.moneyAvailable) {
|
||||
return -1;
|
||||
} else if (hackAmount === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const percentHacked = calculatePercentMoneyHacked(server, Player);
|
||||
|
Loading…
Reference in New Issue
Block a user