Merge pull request #3164 from danielyxie/dev

Fix spendHashes bug
This commit is contained in:
hydroflame 2022-03-17 17:54:26 -04:00 committed by GitHub
commit 28ab283020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -179,7 +179,8 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, he
},
spendHashes: function (_upgName: unknown, _upgTarget: unknown): boolean {
const upgName = helper.string("spendHashes", "upgName", _upgName);
const upgTarget = helper.string("spendHashes", "upgTarget", _upgTarget);
let upgTarget = "";
if (_upgTarget !== undefined) upgTarget = helper.string("spendHashes", "upgTarget", _upgTarget);
if (!hasHacknetServers(player)) {
return false;
}