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`
This commit is contained in:
DavidGrinberg
2022-03-25 13:06:12 -04:00
committed by GitHub
parent 1c801c5651
commit c6a2664296

View File

@@ -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) {