mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 08:13:50 +02:00
NETSCRIPT: Add Singularity.getFactionEnemies() (#1192)
This commit is contained in:
@@ -768,6 +768,12 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
const fac = Factions[facName];
|
||||
return [...fac.getInfo().inviteReqs].map((condition) => condition.toJSON());
|
||||
},
|
||||
getFactionEnemies: (ctx) => (_facName) => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
const facName = getEnumHelper("FactionName").nsGetMember(ctx, _facName);
|
||||
const fac = Factions[facName];
|
||||
return fac.getInfo().enemies.slice();
|
||||
},
|
||||
checkFactionInvitations: (ctx) => () => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
// Manually trigger a check for faction invites
|
||||
|
||||
Reference in New Issue
Block a user