mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
grow() no longer reports Infinite growth when money is at 0
This commit is contained in:
parent
4d2290bcb1
commit
23c862b727
@ -514,6 +514,7 @@ let CONSTANTS = {
|
||||
* It is now possible to use freely use angled bracket (<, >) and create DOM elements using tprint()
|
||||
* The game's theme colors can now be set through the Terminal configuration (.fconf).
|
||||
* You can now switch to the old left-hand main menu bar through the Terminal configuration (.fconf)
|
||||
* grow() percentage is no longer reported as Infinity when a server's money is grown from 0 to X
|
||||
`
|
||||
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
return netscriptDelay(growTime * 1000, workerScript).then(function() {
|
||||
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
|
||||
const moneyBefore = server.moneyAvailable;
|
||||
const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;
|
||||
server.moneyAvailable += (1 * threads); //It can be grown even if it has no money
|
||||
var growthPercentage = processSingleServerGrowth(server, 450 * threads);
|
||||
const moneyAfter = server.moneyAvailable;
|
||||
|
Loading…
Reference in New Issue
Block a user