diff --git a/markdown/bitburner.corporation.bribe.md b/markdown/bitburner.corporation.bribe.md index 6a0c5122d..b3529f74e 100644 --- a/markdown/bitburner.corporation.bribe.md +++ b/markdown/bitburner.corporation.bribe.md @@ -15,14 +15,14 @@ Bribe a faction. You must satisfy these conditions: **Signature:** ```typescript -bribe(factionName: string, amountCash: number): boolean; +bribe(factionName: FactionName, amountCash: number): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| factionName | string | Faction name | +| factionName | [FactionName](./bitburner.factionname.md) | Faction name | | amountCash | number | Amount of money to bribe | **Returns:** diff --git a/markdown/bitburner.factionworktask.factionname.md b/markdown/bitburner.factionworktask.factionname.md index a9da361eb..7ccb3f330 100644 --- a/markdown/bitburner.factionworktask.factionname.md +++ b/markdown/bitburner.factionworktask.factionname.md @@ -7,5 +7,5 @@ **Signature:** ```typescript -factionName: string; +factionName: FactionName; ``` diff --git a/markdown/bitburner.factionworktask.md b/markdown/bitburner.factionworktask.md index 655f7ab40..06c741c70 100644 --- a/markdown/bitburner.factionworktask.md +++ b/markdown/bitburner.factionworktask.md @@ -21,7 +21,7 @@ An object representing the current work for a faction | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [factionName](./bitburner.factionworktask.factionname.md) | | string | | +| [factionName](./bitburner.factionworktask.factionname.md) | | [FactionName](./bitburner.factionname.md) | | | [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | | | [type](./bitburner.factionworktask.type.md) | | "FACTION" | | diff --git a/markdown/bitburner.gang.creategang.md b/markdown/bitburner.gang.creategang.md index 84d1701da..89453e517 100644 --- a/markdown/bitburner.gang.creategang.md +++ b/markdown/bitburner.gang.creategang.md @@ -9,14 +9,14 @@ Create a gang. **Signature:** ```typescript -createGang(faction: string): boolean; +createGang(faction: FactionName): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of the faction that you want to create a gang with. This faction must allow this action, and you must be its member. | +| faction | [FactionName](./bitburner.factionname.md) | Name of the faction that you want to create a gang with. This faction must allow this action, and you must be its member. | **Returns:** diff --git a/markdown/bitburner.singularity.checkfactioninvitations.md b/markdown/bitburner.singularity.checkfactioninvitations.md index e0898b9ca..804959b40 100644 --- a/markdown/bitburner.singularity.checkfactioninvitations.md +++ b/markdown/bitburner.singularity.checkfactioninvitations.md @@ -9,11 +9,11 @@ List all current faction invitations. **Signature:** ```typescript -checkFactionInvitations(): string[]; +checkFactionInvitations(): FactionName[]; ``` **Returns:** -string\[\] +[FactionName](./bitburner.factionname.md)\[\] Array with the name of all Factions you currently have outstanding invitations from. diff --git a/markdown/bitburner.singularity.donatetofaction.md b/markdown/bitburner.singularity.donatetofaction.md index afcd570f2..d4380fcbf 100644 --- a/markdown/bitburner.singularity.donatetofaction.md +++ b/markdown/bitburner.singularity.donatetofaction.md @@ -9,14 +9,14 @@ Donate to a faction. **Signature:** ```typescript -donateToFaction(faction: string, amount: number): boolean; +donateToFaction(faction: FactionName, amount: number): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction to donate to. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction to donate to. | | amount | number | Amount of money to donate. | **Returns:** diff --git a/markdown/bitburner.singularity.getaugmentationfactions.md b/markdown/bitburner.singularity.getaugmentationfactions.md index 6fb45e275..2ffa06009 100644 --- a/markdown/bitburner.singularity.getaugmentationfactions.md +++ b/markdown/bitburner.singularity.getaugmentationfactions.md @@ -9,7 +9,7 @@ Get a list of faction(s) that have a specific Augmentation. **Signature:** ```typescript -getAugmentationFactions(augName: string): string[]; +getAugmentationFactions(augName: string): FactionName[]; ``` ## Parameters @@ -20,7 +20,7 @@ getAugmentationFactions(augName: string): string[]; **Returns:** -string\[\] +[FactionName](./bitburner.factionname.md)\[\] Array containing the names of all factions. diff --git a/markdown/bitburner.singularity.getaugmentationsfromfaction.md b/markdown/bitburner.singularity.getaugmentationsfromfaction.md index 9a2fc2933..31f7dfdbc 100644 --- a/markdown/bitburner.singularity.getaugmentationsfromfaction.md +++ b/markdown/bitburner.singularity.getaugmentationsfromfaction.md @@ -9,14 +9,14 @@ Get a list of augmentation available from a faction. **Signature:** ```typescript -getAugmentationsFromFaction(faction: string): string[]; +getAugmentationsFromFaction(faction: FactionName): string[]; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction. | **Returns:** diff --git a/markdown/bitburner.singularity.getfactionenemies.md b/markdown/bitburner.singularity.getfactionenemies.md index 03744a279..7fd3b8d69 100644 --- a/markdown/bitburner.singularity.getfactionenemies.md +++ b/markdown/bitburner.singularity.getfactionenemies.md @@ -9,14 +9,14 @@ Get a list of enemies of a faction. **Signature:** ```typescript -getFactionEnemies(faction: string): string[]; +getFactionEnemies(faction: FactionName): string[]; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction. | **Returns:** diff --git a/markdown/bitburner.singularity.getfactionfavor.md b/markdown/bitburner.singularity.getfactionfavor.md index 4c46a2a8b..e689f9004 100644 --- a/markdown/bitburner.singularity.getfactionfavor.md +++ b/markdown/bitburner.singularity.getfactionfavor.md @@ -9,14 +9,14 @@ Get faction favor. **Signature:** ```typescript -getFactionFavor(faction: string): number; +getFactionFavor(faction: FactionName): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction. | **Returns:** diff --git a/markdown/bitburner.singularity.getfactionfavorgain.md b/markdown/bitburner.singularity.getfactionfavorgain.md index dab454bc4..4fb07cdfa 100644 --- a/markdown/bitburner.singularity.getfactionfavorgain.md +++ b/markdown/bitburner.singularity.getfactionfavorgain.md @@ -9,14 +9,14 @@ Get faction favor gain. **Signature:** ```typescript -getFactionFavorGain(faction: string): number; +getFactionFavorGain(faction: FactionName): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction. | **Returns:** diff --git a/markdown/bitburner.singularity.getfactioninviterequirements.md b/markdown/bitburner.singularity.getfactioninviterequirements.md index 198000f46..97e280b67 100644 --- a/markdown/bitburner.singularity.getfactioninviterequirements.md +++ b/markdown/bitburner.singularity.getfactioninviterequirements.md @@ -9,14 +9,14 @@ List conditions for being invited to a faction. **Signature:** ```typescript -getFactionInviteRequirements(faction: string): PlayerRequirement[]; +getFactionInviteRequirements(faction: FactionName): PlayerRequirement[]; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of the faction | +| faction | [FactionName](./bitburner.factionname.md) | Name of the faction | **Returns:** diff --git a/markdown/bitburner.singularity.getfactionrep.md b/markdown/bitburner.singularity.getfactionrep.md index c645637ea..a9067ade9 100644 --- a/markdown/bitburner.singularity.getfactionrep.md +++ b/markdown/bitburner.singularity.getfactionrep.md @@ -9,14 +9,14 @@ Get faction reputation. **Signature:** ```typescript -getFactionRep(faction: string): number; +getFactionRep(faction: FactionName): number; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction to work for. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction to work for. | **Returns:** diff --git a/markdown/bitburner.singularity.getfactionworktypes.md b/markdown/bitburner.singularity.getfactionworktypes.md index 88d9dbe9a..37e2d1605 100644 --- a/markdown/bitburner.singularity.getfactionworktypes.md +++ b/markdown/bitburner.singularity.getfactionworktypes.md @@ -9,14 +9,14 @@ Get the work types of a faction. **Signature:** ```typescript -getFactionWorkTypes(faction: string): FactionWorkType[]; +getFactionWorkTypes(faction: FactionName): FactionWorkType[]; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of the faction. | +| faction | [FactionName](./bitburner.factionname.md) | Name of the faction. | **Returns:** diff --git a/markdown/bitburner.singularity.joinfaction.md b/markdown/bitburner.singularity.joinfaction.md index d3f4c8eb3..d47570cd9 100644 --- a/markdown/bitburner.singularity.joinfaction.md +++ b/markdown/bitburner.singularity.joinfaction.md @@ -9,14 +9,14 @@ Join a faction. **Signature:** ```typescript -joinFaction(faction: string): boolean; +joinFaction(faction: FactionName): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction to join. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction to join. | **Returns:** diff --git a/markdown/bitburner.singularity.purchaseaugmentation.md b/markdown/bitburner.singularity.purchaseaugmentation.md index e3d6141d9..782450c4e 100644 --- a/markdown/bitburner.singularity.purchaseaugmentation.md +++ b/markdown/bitburner.singularity.purchaseaugmentation.md @@ -9,14 +9,14 @@ Purchase an augmentation **Signature:** ```typescript -purchaseAugmentation(faction: string, augmentation: string): boolean; +purchaseAugmentation(faction: FactionName, augmentation: string): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction to purchase Augmentation from. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction to purchase Augmentation from. | | augmentation | string | Name of Augmentation to purchase. | **Returns:** diff --git a/markdown/bitburner.singularity.workforfaction.md b/markdown/bitburner.singularity.workforfaction.md index d46ca5beb..2052087b2 100644 --- a/markdown/bitburner.singularity.workforfaction.md +++ b/markdown/bitburner.singularity.workforfaction.md @@ -9,14 +9,14 @@ Work for a faction. **Signature:** ```typescript -workForFaction(faction: string, workType: FactionWorkType, focus?: boolean): boolean; +workForFaction(faction: FactionName, workType: FactionWorkType, focus?: boolean): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| faction | string | Name of faction to work for. | +| faction | [FactionName](./bitburner.factionname.md) | Name of faction to work for. | | workType | [FactionWorkType](./bitburner.factionworktype.md) | Type of work to perform for the faction. | | focus | boolean | _(Optional)_ Acquire player focus on this work operation. Optional. Defaults to true. | diff --git a/markdown/bitburner.sleeve.settofactionwork.md b/markdown/bitburner.sleeve.settofactionwork.md index 47f3f1d84..97f928527 100644 --- a/markdown/bitburner.sleeve.settofactionwork.md +++ b/markdown/bitburner.sleeve.settofactionwork.md @@ -9,7 +9,11 @@ Set a sleeve to work for a faction. **Signature:** ```typescript -setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: FactionWorkType): boolean | undefined; +setToFactionWork( + sleeveNumber: number, + factionName: FactionName, + factionWorkType: FactionWorkType, + ): boolean | undefined; ``` ## Parameters @@ -17,7 +21,7 @@ setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: Fac | Parameter | Type | Description | | --- | --- | --- | | sleeveNumber | number | Index of the sleeve to work for the faction. | -| factionName | string | Name of the faction to work for. | +| factionName | [FactionName](./bitburner.factionname.md) | Name of the faction to work for. | | factionWorkType | [FactionWorkType](./bitburner.factionworktype.md) | Name of the action to perform for this faction. | **Returns:** diff --git a/markdown/bitburner.sleevefactiontask.md b/markdown/bitburner.sleevefactiontask.md index 51b7cd364..84b2c503e 100644 --- a/markdown/bitburner.sleevefactiontask.md +++ b/markdown/bitburner.sleevefactiontask.md @@ -11,8 +11,8 @@ type SleeveFactionTask = { type: "FACTION"; factionWorkType: FactionWorkType; - factionName: string; + factionName: FactionName; }; ``` -**References:** [FactionWorkType](./bitburner.factionworktype.md) +**References:** [FactionWorkType](./bitburner.factionworktype.md), [FactionName](./bitburner.factionname.md) diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index bff00f809..5ff79a970 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -1114,7 +1114,7 @@ type SleeveCrimeTask = { type SleeveFactionTask = { type: "FACTION"; factionWorkType: FactionWorkType; - factionName: string; + factionName: FactionName; }; /** @public */ @@ -1761,7 +1761,7 @@ export interface CrimeTask extends BaseTask { export interface FactionWorkTask extends BaseTask { type: "FACTION"; factionWorkType: FactionWorkType; - factionName: string; + factionName: FactionName; } /** @@ -2252,7 +2252,7 @@ export interface Singularity { * ] * ``` */ - getFactionInviteRequirements(faction: string): PlayerRequirement[]; + getFactionInviteRequirements(faction: FactionName): PlayerRequirement[]; /** * Get a list of enemies of a faction. @@ -2266,7 +2266,7 @@ export interface Singularity { * @param faction - Name of faction. * @returns Array containing the names of all enemies of the faction. */ - getFactionEnemies(faction: string): string[]; + getFactionEnemies(faction: FactionName): string[]; /** * List all current faction invitations. @@ -2279,7 +2279,7 @@ export interface Singularity { * * @returns Array with the name of all Factions you currently have outstanding invitations from. */ - checkFactionInvitations(): string[]; + checkFactionInvitations(): FactionName[]; /** * Join a faction. @@ -2292,7 +2292,7 @@ export interface Singularity { * @param faction - Name of faction to join. * @returns True if player joined the faction, and false otherwise. */ - joinFaction(faction: string): boolean; + joinFaction(faction: FactionName): boolean; /** * Work for a faction. @@ -2320,7 +2320,7 @@ export interface Singularity { * @param focus - Acquire player focus on this work operation. Optional. Defaults to true. * @returns True if the player starts working, and false otherwise. */ - workForFaction(faction: string, workType: FactionWorkType, focus?: boolean): boolean; + workForFaction(faction: FactionName, workType: FactionWorkType, focus?: boolean): boolean; /** * Get the work types of a faction. @@ -2332,7 +2332,7 @@ export interface Singularity { * @param faction - Name of the faction. * @returns The work types of the faction. */ - getFactionWorkTypes(faction: string): FactionWorkType[]; + getFactionWorkTypes(faction: FactionName): FactionWorkType[]; /** * Get faction reputation. @@ -2345,7 +2345,7 @@ export interface Singularity { * @param faction - Name of faction to work for. * @returns Amount of reputation you have for the specified faction. */ - getFactionRep(faction: string): number; + getFactionRep(faction: FactionName): number; /** * Get faction favor. @@ -2358,7 +2358,7 @@ export interface Singularity { * @param faction - Name of faction. * @returns Amount of favor you have for the specified faction. */ - getFactionFavor(faction: string): number; + getFactionFavor(faction: FactionName): number; /** * Get faction favor gain. @@ -2372,7 +2372,7 @@ export interface Singularity { * @param faction - Name of faction. * @returns Amount of favor you will gain for the specified faction when you reset by installing Augmentations. */ - getFactionFavorGain(faction: string): number; + getFactionFavorGain(faction: FactionName): number; /** * Donate to a faction. @@ -2391,7 +2391,7 @@ export interface Singularity { * @param amount - Amount of money to donate. * @returns True if the money was donated, and false otherwise. */ - donateToFaction(faction: string, amount: number): boolean; + donateToFaction(faction: FactionName, amount: number): boolean; /** * Create a program. @@ -2524,7 +2524,7 @@ export interface Singularity { * @param augName - Name of Augmentation. * @returns Array containing the names of all factions. */ - getAugmentationFactions(augName: string): string[]; + getAugmentationFactions(augName: string): FactionName[]; /** * Get a list of augmentation available from a faction. @@ -2538,7 +2538,7 @@ export interface Singularity { * @param faction - Name of faction. * @returns Array containing the names of all Augmentations. */ - getAugmentationsFromFaction(faction: string): string[]; + getAugmentationsFromFaction(faction: FactionName): string[]; /** * Get the pre-requisite of an augmentation. @@ -2601,7 +2601,7 @@ export interface Singularity { * @param augmentation - Name of Augmentation to purchase. * @returns True if the Augmentation is successfully purchased, and false otherwise. */ - purchaseAugmentation(faction: string, augmentation: string): boolean; + purchaseAugmentation(faction: FactionName, augmentation: string): boolean; /** * Get the stats of an augmentation. @@ -4032,7 +4032,7 @@ export interface Gang { * @param faction - Name of the faction that you want to create a gang with. This faction must allow this action, and you must be its member. * @returns True if the gang was created, false otherwise. */ - createGang(faction: string): boolean; + createGang(faction: FactionName): boolean; /** * Check if you're in a gang. @@ -4977,7 +4977,11 @@ export interface Sleeve { * @param factionWorkType - Name of the action to perform for this faction. * @returns True if the sleeve started working for this faction, false otherwise. Can also throw on errors. */ - setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: FactionWorkType): boolean | undefined; + setToFactionWork( + sleeveNumber: number, + factionName: FactionName, + factionWorkType: FactionWorkType, + ): boolean | undefined; /** * Set a sleeve to work for a company. @@ -9523,7 +9527,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI { * @param amountCash - Amount of money to bribe * @returns true if successful, false if not */ - bribe(factionName: string, amountCash: number): boolean; + bribe(factionName: FactionName, amountCash: number): boolean; /** * Get corporation data.