fix for stanek.acceptGift not working (#1001)

This commit is contained in:
Jesse Clark 2024-01-03 01:12:14 +11:00 committed by GitHub
parent 4db4b77954
commit 8742df9588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -110,11 +110,14 @@ export function NetscriptStanek(): InternalAPI<IStanek> {
acceptGift: (ctx) => () => {
const cotmgFaction = Factions[FactionName.ChurchOfTheMachineGod];
// Check if the player is eligible to join the church
if (cotmgFaction.getInfo().inviteReqs.isSatisfied(Player)) {
// Attempt to join CotMG
joinFaction(cotmgFaction);
// Attempt to install the first Stanek aug (unless it is already queued)
if (!Player.hasAugmentation(AugmentationName.StaneksGift1, false)) {
if (Player.canAccessCotMG()) {
const augs = [...Player.augmentations, ...Player.queuedAugmentations].filter(
(a) => a.name !== AugmentationName.NeuroFluxGovernor,
);
if (augs.length == 0) {
// Join the CotMG factionn
joinFaction(cotmgFaction);
// Install the first Stanek aug
applyAugmentation({ name: AugmentationName.StaneksGift1, level: 1 });
helpers.log(
ctx,