hotfix grow percent being logged 100x too high

This commit is contained in:
Olivier Gagnon
2021-05-18 10:51:36 -04:00
parent 8ba63f4951
commit 4dc206bb3e
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -875,7 +875,7 @@ function NetscriptFunctions(workerScript) {
if (growthPercentage == 1) {
expGain = 0;
}
const logGrowPercent = (moneyAfter/moneyBefore)*100 - 100;
const logGrowPercent = (moneyAfter/moneyBefore) - 1;
workerScript.log("grow", `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(logGrowPercent, 6)}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)}).`);
workerScript.scriptRef.onlineExpGained += expGain;
Player.gainHackingExp(expGain);