From d16576f3a710cae800426f2c7fe3e7bf60e2ea7d Mon Sep 17 00:00:00 2001 From: Mughur Date: Wed, 14 Sep 2022 15:49:50 +0300 Subject: [PATCH 1/3] TRP message is sent only after installing --- src/Message/MessageHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/MessageHelpers.ts b/src/Message/MessageHelpers.ts index 82d0d6353..b24a25991 100644 --- a/src/Message/MessageHelpers.ts +++ b/src/Message/MessageHelpers.ts @@ -69,7 +69,7 @@ function checkForMessagesToSend(): void { const truthGazer = Messages[MessageFilenames.TruthGazer]; const redpill = Messages[MessageFilenames.RedPill]; - if (Player.hasAugmentation(AugmentationNames.TheRedPill)) { + if (Player.hasAugmentation(AugmentationNames.TheRedPill,true)) { //Get the world daemon required hacking level const worldDaemon = GetServer(SpecialServers.WorldDaemon); if (!(worldDaemon instanceof Server)) { From 4b859131b4b5c4326b1b84c9f9c1c525762bfa08 Mon Sep 17 00:00:00 2001 From: Mughur Date: Wed, 14 Sep 2022 15:49:50 +0300 Subject: [PATCH 2/3] TRP message is sent only after installing --- src/Message/MessageHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/MessageHelpers.ts b/src/Message/MessageHelpers.ts index 82d0d6353..26764b72c 100644 --- a/src/Message/MessageHelpers.ts +++ b/src/Message/MessageHelpers.ts @@ -69,7 +69,7 @@ function checkForMessagesToSend(): void { const truthGazer = Messages[MessageFilenames.TruthGazer]; const redpill = Messages[MessageFilenames.RedPill]; - if (Player.hasAugmentation(AugmentationNames.TheRedPill)) { + if (Player.hasAugmentation(AugmentationNames.TheRedPill, true)) { //Get the world daemon required hacking level const worldDaemon = GetServer(SpecialServers.WorldDaemon); if (!(worldDaemon instanceof Server)) { From 4c5adc8dfbc60c3861b4bf3d94323f4eeadfe717 Mon Sep 17 00:00:00 2001 From: Mughur Date: Wed, 14 Sep 2022 21:02:12 +0300 Subject: [PATCH 3/3] More hasAugmentation fixes --- src/NetscriptFunctions/Stanek.ts | 2 +- src/Prestige.ts | 13 ++++++++----- src/Work/FactionWork.tsx | 4 ++-- src/Work/GraftingWork.tsx | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/NetscriptFunctions/Stanek.ts b/src/NetscriptFunctions/Stanek.ts index c2e936f1b..f0753b379 100644 --- a/src/NetscriptFunctions/Stanek.ts +++ b/src/NetscriptFunctions/Stanek.ts @@ -142,7 +142,7 @@ export function NetscriptStanek(): InternalAPI { //Return true iff the player is in CotMG and has the first Stanek aug installed return ( Factions[FactionNames.ChurchOfTheMachineGod].isMember && - player.hasAugmentation(AugmentationNames.StaneksGift1) + player.hasAugmentation(AugmentationNames.StaneksGift1, true) ); }, }; diff --git a/src/Prestige.ts b/src/Prestige.ts index aed8096e7..b526946fe 100755 --- a/src/Prestige.ts +++ b/src/Prestige.ts @@ -55,15 +55,15 @@ export function prestigeAugmentation(): void { AddToAllServers(homeComp); prestigeHomeComputer(Player, homeComp); - if (augmentationExists(AugmentationNames.Neurolink) && Player.hasAugmentation(AugmentationNames.Neurolink)) { + if (augmentationExists(AugmentationNames.Neurolink) && Player.hasAugmentation(AugmentationNames.Neurolink, true)) { homeComp.programs.push(Programs.FTPCrackProgram.name); homeComp.programs.push(Programs.RelaySMTPProgram.name); } - if (augmentationExists(AugmentationNames.CashRoot) && Player.hasAugmentation(AugmentationNames.CashRoot)) { + if (augmentationExists(AugmentationNames.CashRoot) && Player.hasAugmentation(AugmentationNames.CashRoot, true)) { Player.setMoney(1e6); homeComp.programs.push(Programs.BruteSSHProgram.name); } - if (augmentationExists(AugmentationNames.PCMatrix) && Player.hasAugmentation(AugmentationNames.PCMatrix)) { + if (augmentationExists(AugmentationNames.PCMatrix) && Player.hasAugmentation(AugmentationNames.PCMatrix, true)) { homeComp.programs.push(Programs.DeepscanV1.name); homeComp.programs.push(Programs.AutoLink.name); } @@ -151,7 +151,7 @@ export function prestigeAugmentation(): void { } // Red Pill - if (augmentationExists(AugmentationNames.TheRedPill) && Player.hasAugmentation(AugmentationNames.TheRedPill)) { + if (augmentationExists(AugmentationNames.TheRedPill) && Player.hasAugmentation(AugmentationNames.TheRedPill, true)) { const WorldDaemon = GetServer(SpecialServers.WorldDaemon); const DaedalusServer = GetServer(SpecialServers.DaedalusServer); if (WorldDaemon && DaedalusServer) { @@ -160,7 +160,10 @@ export function prestigeAugmentation(): void { } } - if (augmentationExists(AugmentationNames.StaneksGift1) && Player.hasAugmentation(AugmentationNames.StaneksGift1)) { + if ( + augmentationExists(AugmentationNames.StaneksGift1) && + Player.hasAugmentation(AugmentationNames.StaneksGift1, true) + ) { joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]); } diff --git a/src/Work/FactionWork.tsx b/src/Work/FactionWork.tsx index 8ec1e0f23..d1ad4e988 100644 --- a/src/Work/FactionWork.tsx +++ b/src/Work/FactionWork.tsx @@ -39,7 +39,7 @@ export class FactionWork extends Work { getReputationRate(player: IPlayer): number { let focusBonus = 1; - if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager,true)) { + if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager, true)) { focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus; } return calculateFactionRep(player, this.factionWorkType, this.getFaction().favor) * focusBonus; @@ -47,7 +47,7 @@ export class FactionWork extends Work { getExpRates(player: IPlayer): WorkStats { let focusBonus = 1; - if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager,true)) { + if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager, true)) { focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus; } const rate = calculateFactionExp(player, this.factionWorkType); diff --git a/src/Work/GraftingWork.tsx b/src/Work/GraftingWork.tsx index 3eacb278d..c0279235d 100644 --- a/src/Work/GraftingWork.tsx +++ b/src/Work/GraftingWork.tsx @@ -37,7 +37,7 @@ export class GraftingWork extends Work { process(player: IPlayer, cycles: number): boolean { let focusBonus = 1; - if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager,true)) { + if (!player.hasAugmentation(AugmentationNames.NeuroreceptorManager, true)) { focusBonus = player.focus ? 1 : CONSTANTS.BaseFocusBonus; } @@ -52,7 +52,7 @@ export class GraftingWork extends Work { if (!cancelled) { applyAugmentation({ name: augName, level: 1 }); - if (!player.hasAugmentation(AugmentationNames.CongruityImplant)) { + if (!player.hasAugmentation(AugmentationNames.CongruityImplant, true)) { player.entropy += 1; player.applyEntropy(player.entropy); } @@ -62,7 +62,7 @@ export class GraftingWork extends Work { <> You've finished grafting {augName}.
The augmentation has been applied to your body{" "} - {player.hasAugmentation(AugmentationNames.CongruityImplant) ? "." : ", but you feel a bit off."} + {player.hasAugmentation(AugmentationNames.CongruityImplant, true) ? "." : ", but you feel a bit off."} , ); }