mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
GRAFTING: Add new api for checking ongoing grafting (#1435)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
## Grafting.getAugmentationGraftTime() method
|
||||
|
||||
Retrieves the time required to graft an aug.
|
||||
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.
|
||||
|
||||
**Signature:**
|
||||
|
||||
@@ -22,7 +22,7 @@ getAugmentationGraftTime(augName: string): number;
|
||||
|
||||
number
|
||||
|
||||
The time required, in millis, to graft the named augmentation.
|
||||
The time required, in milliseconds, to graft the named augmentation.
|
||||
|
||||
## Exceptions
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## Grafting.graftAugmentation() method
|
||||
|
||||
Begins grafting the named aug. You must be in New Tokyo to use this.
|
||||
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.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ This API requires Source-File 10 to use.
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [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. |
|
||||
| [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. |
|
||||
| [graftAugmentation(augName, focus)](./bitburner.grafting.graftaugmentation.md) | Begins grafting the named aug. You must be in New Tokyo to use this. |
|
||||
| [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. |
|
||||
|
||||
|
||||
23
markdown/bitburner.grafting.waitforongoinggrafting.md
Normal file
23
markdown/bitburner.grafting.waitforongoinggrafting.md
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Grafting](./bitburner.grafting.md) > [waitForOngoingGrafting](./bitburner.grafting.waitforongoinggrafting.md)
|
||||
|
||||
## Grafting.waitForOngoingGrafting() method
|
||||
|
||||
Wait until the ongoing grafting finishes or is canceled.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
waitForOngoingGrafting(): Promise<void>;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
Promise<void>
|
||||
|
||||
A promise that resolves when the current grafting finishes or is canceled. If there is no current work, the promise resolves immediately. If the current work is not a grafting work, the promise rejects immediately.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 1 GB
|
||||
|
||||
11
markdown/bitburner.graftingtask.completion.md
Normal file
11
markdown/bitburner.graftingtask.completion.md
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GraftingTask](./bitburner.graftingtask.md) > [completion](./bitburner.graftingtask.completion.md)
|
||||
|
||||
## GraftingTask.completion property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
completion: Promise<void>;
|
||||
```
|
||||
@@ -21,6 +21,7 @@ An object representing the current grafting status
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [augmentation](./bitburner.graftingtask.augmentation.md) | | string | |
|
||||
| [completion](./bitburner.graftingtask.completion.md) | | Promise<void> | |
|
||||
| [cyclesWorked](./bitburner.graftingtask.cyclesworked.md) | | number | |
|
||||
| [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user