More hasAugmentation fixes

This commit is contained in:
Mughur 2022-09-14 21:02:12 +03:00
parent 75c738cdb0
commit 4c5adc8dfb
4 changed files with 14 additions and 11 deletions

@ -142,7 +142,7 @@ export function NetscriptStanek(): InternalAPI<IStanek> {
//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)
);
},
};

@ -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]);
}

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

@ -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}.<br />
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."}
</>,
);
}