DOCUMENTATION: Clarify getGraftableAugmentations API (#1858)

This commit is contained in:
catloversg
2024-12-18 18:23:56 +07:00
committed by GitHub
parent 40f3d6ea7b
commit c2fe6108e1
4 changed files with 19 additions and 10 deletions

View File

@@ -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:**
@@ -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").

View File

@@ -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. |

View File

@@ -48,8 +48,7 @@ export function NetscriptGrafting(): InternalAPI<IGrafting> {
getGraftableAugmentations: (ctx) => () => {
checkGraftingAPIAccess(ctx);
const graftableAugs = getGraftingAvailableAugs();
return graftableAugs;
return getGraftingAvailableAugs();
},
graftAugmentation:

View File

@@ -5007,15 +5007,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:
*
* @returns An array of graftable Augmentations.
* - 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.
*/
getGraftableAugmentations(): string[];