Merge pull request #2481 from nickofolas/fix-terminal-exp

Fix terminal grow/weaken EXP gain
This commit is contained in:
hydroflame 2022-01-08 18:15:03 -05:00 committed by GitHub
commit 0de588ee17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -247,6 +247,8 @@ export class Terminal implements ITerminal {
const oldSec = server.hackDifficulty;
const growth = processSingleServerGrowth(server, 25, player, server.cpuCores) - 1;
const newSec = server.hackDifficulty;
player.gainHackingExp(expGain);
this.print(
`Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(
growth,
@ -270,6 +272,8 @@ export class Terminal implements ITerminal {
const oldSec = server.hackDifficulty;
server.weaken(CONSTANTS.ServerWeakenAmount);
const newSec = server.hackDifficulty;
player.gainHackingExp(expGain);
this.print(
`Security decreased on '${server.hostname}' from ${numeralWrapper.formatSecurity(oldSec)} to ${numeralWrapper.formatSecurity(
newSec,