From c6a2664296dff2da01049848f41d6160e1f6232f Mon Sep 17 00:00:00 2001 From: DavidGrinberg Date: Fri, 25 Mar 2022 13:06:12 -0400 Subject: [PATCH] purchaseTor returns true if player already has tor Change `purchaseTor` to return `true` if the player already has purchased Tor. Previously it would return `false` Changing this to true puts the behavior inline with the already existing behavior of `purchaseProgram`, which returns true if you have already purchased the program. Additionally this lets us call `purcahseTor` with the same logic that we use to call `purchaseProgram` --- src/NetscriptFunctions/Singularity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index 26fbd760d..3972d0bb2 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -499,7 +499,7 @@ export function NetscriptSingularity( if (player.hasTorRouter()) { workerScript.log("purchaseTor", () => "You already have a TOR router!"); - return false; + return true; } if (player.money < CONSTANTS.TorRouterCost) {