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