Merge pull request #3253 from DavidGrinberg/purchase-tor-router-return

purchaseTor() should returns true if player already has Tor
This commit is contained in:
hydroflame 2022-03-29 11:07:35 -04:00 committed by GitHub
commit ae427f11d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

@ -499,7 +499,7 @@ export function NetscriptSingularity(
if (player.hasTorRouter()) { if (player.hasTorRouter()) {
workerScript.log("purchaseTor", () => "You already have a TOR router!"); workerScript.log("purchaseTor", () => "You already have a TOR router!");
return false; return true;
} }
if (player.money < CONSTANTS.TorRouterCost) { if (player.money < CONSTANTS.TorRouterCost) {

@ -1597,7 +1597,7 @@ export interface Singularity {
* purchasing a TOR router using this function is the same as if you were to * purchasing a TOR router using this function is the same as if you were to
* manually purchase one. * manually purchase one.
* *
* @returns True if actions is successful, false otherwise. * @returns True if actions is successful or you already own TOR router, false otherwise.
*/ */
purchaseTor(): boolean; purchaseTor(): boolean;