From 42dcbf889e62b30fa6ac49827827f462d6948608 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 20 May 2022 17:28:21 -0400 Subject: [PATCH] fix typo --- src/NetscriptFunctions/Singularity.ts | 12 ++---------- src/PersonObjects/Sleeve/Sleeve.ts | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index aea458c1f..0d8c04e77 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -487,16 +487,8 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript } player.loseMoney(CONSTANTS.TorRouterCost, "other"); - const darkweb = safetlyCreateUniqueServer({ - ip: createUniqueRandomIp(), - hostname: "darkweb", - organizationName: "", - isConnectedTo: false, - adminRights: false, - purchasedByPlayer: false, - maxRam: 1, - }); - AddToAllServers(darkweb); + const darkweb = GetServer(SpecialServers.DarkWeb); + if (!darkweb) throw _ctx.makeRuntimeErrorMsg("DarkWeb was not a server but should have been"); player.getHomeComputer().serversOnNetwork.push(darkweb.hostname); darkweb.serversOnNetwork.push(player.getHomeComputer().hostname); diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 55797c227..dd7312729 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -1110,7 +1110,7 @@ export class Sleeve extends Person { this.gainRatesForTask.cha = 2 * BladeburnerConstants.BaseStatGain * (p.bladeburner?.getRecruitmentTime(this) ?? 0) * 1000; this.currentTaskLocation = `(Success Rate: ${numeralWrapper.formatPercentage( - this.recrutmentSuccessChance(p), + this.recruitmentSuccessChance(p), )})`; break; case "Diplomacy": @@ -1138,7 +1138,7 @@ export class Sleeve extends Person { return true; } - recrutmentSuccessChance(p: IPlayer): number { + recruitmentSuccessChance(p: IPlayer): number { return Math.max(0, Math.min(1, p.bladeburner?.getRecruitmentSuccessChance(this) ?? 0)); }