Open
Description
Based on:
Assume the user doesn't have SF4 / SF5 and currently not in BN4 / BN5 in this discussion.
For example, if the user wants to know whether they can use Stanek's API, the only way is run ns.stanek.acceptGift()
and see return value.
However, running that causes the user accept gift, and suffers 10% all stat penalty, therefore it is not suitable for check eligibility of Stanek's API.
Almost all features in this game has similar issues; the user should actually start/join/create the feature to know whether the user is eligibile to access.
This feature request is to provide NS function isEligible
for each API.
Sample ns.stanek.isEligible
function:
isEligible: () => () => {
// You already accepted Stanek's gift. You can use stanek API of course.
if (Player.hasAugmentation(AugmentationName.StaneksGift1, true)) return true;
// You don't have SF13 and you'are not in BN13. You don't know anything about The Church.
if (!Player.canAccessCotMG()) return false;
// If you installed other augmentation before accepting gift, The Church will treat you filth and you can't use stanek API.
// Otherwise, you can use stanek API, starting from acceptGift().
return [...Player.augmentations, ...Player.queuedAugmentations].filter(
(a) => a.name !== AugmentationName.NeuroFluxGovernor,
).length === 0;
}
Activity