mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
minor tweak
This commit is contained in:
parent
f710c52bdc
commit
dc88d9b478
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -89,8 +89,8 @@ export function processSingleServerGrowth(server: Server, threads: number, p: IP
|
|||||||
if (oldMoneyAvailable !== server.moneyAvailable) {
|
if (oldMoneyAvailable !== server.moneyAvailable) {
|
||||||
//Growing increases server security twice as much as hacking
|
//Growing increases server security twice as much as hacking
|
||||||
let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p, cores);
|
let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p, cores);
|
||||||
usedCycles = Math.min(Math.max(0, usedCycles), threads);
|
usedCycles = Math.min(Math.max(0, Math.ceil(usedCycles)), threads);
|
||||||
server.fortify(2 * CONSTANTS.ServerFortifyAmount * Math.ceil(usedCycles));
|
server.fortify(2 * CONSTANTS.ServerFortifyAmount * usedCycles);
|
||||||
}
|
}
|
||||||
return server.moneyAvailable / oldMoneyAvailable;
|
return server.moneyAvailable / oldMoneyAvailable;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user