Merge pull request #962 from danielyxie/dev

hotfix grow percent being logged 100x too high
This commit is contained in:
hydroflame
2021-05-18 10:52:05 -04:00
committed by GitHub
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);