softcap hacknet max moneyt upgrade

This commit is contained in:
Olivier Gagnon
2021-10-11 17:43:48 -04:00
parent ac3a6b9a6f
commit 30554560da
4 changed files with 38 additions and 14 deletions
+3 -1
View File
@@ -510,7 +510,9 @@ export function purchaseHashUpgrade(player: IPlayer, upgName: string, upgTarget:
}
if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);
target.changeMaximumMoney(upg.value, true);
const old = target.moneyMax;
target.changeMaximumMoney(upg.value);
console.log(target.moneyMax / old);
} catch (e) {
player.hashManager.refundUpgrade(upgName);
return false;