Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCUMENTATION: Clarify getGraftableAugmentations API #1858

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions markdown/bitburner.grafting.getgraftableaugmentations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Grafting.getGraftableAugmentations() method

Retrieves a list of Augmentations that can be grafted.
Retrieves a list of augmentations that can be grafted.

**Signature:**

Expand All @@ -15,11 +15,15 @@ getGraftableAugmentations(): string[];

string\[\]

An array of graftable Augmentations.
An array of graftable augmentations.

## Remarks

RAM cost: 5 GB

Note that this function returns a list of currently graftable Augmentations, based off of the Augmentations that you already own.
Note:

- This function returns a list of currently graftable augmentations, based on the augmentations that you already own.

- This function does not check your current money and prerequisite augmentations. For example, it returns "Augmented Targeting II" even when you don't have enough money to graft that augmentation or don't have the prerequisite augmentation ("Augmented Targeting I").

2 changes: 1 addition & 1 deletion markdown/bitburner.grafting.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This API requires Source-File 10 to use.
| --- | --- |
| [getAugmentationGraftPrice(augName)](./bitburner.grafting.getaugmentationgraftprice.md) | Retrieve the grafting cost of an aug. |
| [getAugmentationGraftTime(augName)](./bitburner.grafting.getaugmentationgrafttime.md) | Retrieves the time required to graft an aug. Do not use this value to determine when the ongoing grafting finishes. The ongoing grafting is affected by current intelligence level and focus bonus. You should use [waitForOngoingGrafting](./bitburner.grafting.waitforongoinggrafting.md) for that purpose. |
| [getGraftableAugmentations()](./bitburner.grafting.getgraftableaugmentations.md) | Retrieves a list of Augmentations that can be grafted. |
| [getGraftableAugmentations()](./bitburner.grafting.getgraftableaugmentations.md) | Retrieves a list of augmentations that can be grafted. |
| [graftAugmentation(augName, focus)](./bitburner.grafting.graftaugmentation.md) | Begins grafting the named aug. You must be in New Tokyo to use this. When you call this API, the current work (grafting or other actions) will be canceled. |
| [waitForOngoingGrafting()](./bitburner.grafting.waitforongoinggrafting.md) | Wait until the ongoing grafting finishes or is canceled. |

3 changes: 1 addition & 2 deletions src/NetscriptFunctions/Grafting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ export function NetscriptGrafting(): InternalAPI<IGrafting> {

getGraftableAugmentations: (ctx) => () => {
checkGraftingAPIAccess(ctx);
const graftableAugs = getGraftingAvailableAugs();
return graftableAugs;
return getGraftingAvailableAugs();
},

graftAugmentation:
Expand Down
14 changes: 10 additions & 4 deletions src/ScriptEditor/NetscriptDefinitions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5005,15 +5005,21 @@ export interface Grafting {
getAugmentationGraftTime(augName: string): number;

/**
* Retrieves a list of Augmentations that can be grafted.
* Retrieves a list of augmentations that can be grafted.
*
* @remarks
* RAM cost: 5 GB
*
* Note that this function returns a list of currently graftable Augmentations,
* based off of the Augmentations that you already own.
* Note:
*
* - This function returns a list of currently graftable augmentations, based on the augmentations that you already
* own.
*
* - This function does not check your current money and prerequisite augmentations. For example, it returns
* "Augmented Targeting II" even when you don't have enough money to graft that augmentation or don't have the
* prerequisite augmentation ("Augmented Targeting I").
*
* @returns An array of graftable Augmentations.
* @returns An array of graftable augmentations.
*/
getGraftableAugmentations(): string[];

Expand Down
Loading