API: Update error message of ns.singularity.joinFaction (#2700)

This commit is contained in:
catloversg
2026-04-29 05:38:43 +07:00
committed by GitHub
parent 9e85068cbb
commit 234ee7a923
3 changed files with 11 additions and 2 deletions
+5
View File
@@ -779,6 +779,11 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
helpers.checkSingularityAccess(ctx);
const facName = getEnumHelper("FactionName").nsGetMember(ctx, _facName);
if (Player.factions.includes(facName)) {
helpers.log(ctx, () => `You are already a member of faction '${facName}'`);
return false;
}
if (!Player.factionInvitations.includes(facName)) {
helpers.log(ctx, () => `You have not been invited by faction '${facName}'`);
return false;