API: Programming-friendly interface to getFactionInviteRequirements (#953)

This commit is contained in:
Jesse Clark
2023-12-16 01:27:22 -08:00
committed by GitHub
parent e957864c4b
commit 473217ef31
79 changed files with 1626 additions and 140 deletions
+1 -3
View File
@@ -816,14 +816,12 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
const companyName = getEnumHelper("CompanyName").nsGetMember(ctx, _companyName);
return Companies[companyName].getFavorGain();
},
/* Function temporarily removed, likely to change in next version to be more programming-friendly instead of providing human-readable string outputs for each requirement
getFactionInviteRequirements: (ctx) => (_facName) => {
helpers.checkSingularityAccess(ctx);
const facName = getEnumHelper("FactionName").nsGetMember(ctx, _facName);
const fac = Factions[facName];
return fac.getInfo().inviteReqs.map((condition) => condition.toString());
return [...fac.getInfo().inviteReqs].map((condition) => condition.toJSON());
},
*/
checkFactionInvitations: (ctx) => () => {
helpers.checkSingularityAccess(ctx);
// Manually trigger a check for faction invites