DOCUMENTATION: Clarify cyclesWorked of Task (#1725)

This commit is contained in:
catloversg 2024-10-24 06:18:18 +07:00 committed by GitHub
parent 9a0400d3df
commit f49d3b32a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 86 additions and 98 deletions

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BaseTask](./bitburner.basetask.md) &gt; [cyclesWorked](./bitburner.basetask.cyclesworked.md)
## BaseTask.cyclesWorked property
The number of game engine cycles has passed since this task started. 1 engine cycle = 200ms.
**Signature:**
```typescript
cyclesWorked: number;
```

@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BaseTask](./bitburner.basetask.md)
## BaseTask interface
Base interface of all tasks.
**Signature:**
```typescript
export interface BaseTask
```
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.basetask.cyclesworked.md) | | number | The number of game engine cycles has passed since this task started. 1 engine cycle = 200ms. |

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyWorkTask](./bitburner.companyworktask.md) &gt; [cyclesWorked](./bitburner.companyworktask.cyclesworked.md)
## CompanyWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

@ -9,8 +9,9 @@ Company Work
**Signature:** **Signature:**
```typescript ```typescript
export interface CompanyWorkTask export interface CompanyWorkTask extends BaseTask
``` ```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks ## Remarks
@ -21,6 +22,5 @@ An object representing the current work for a company
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | | | [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | |
| [cyclesWorked](./bitburner.companyworktask.cyclesworked.md) | | number | |
| [type](./bitburner.companyworktask.type.md) | | "COMPANY" | | | [type](./bitburner.companyworktask.type.md) | | "COMPANY" | |

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CreateProgramWorkTask](./bitburner.createprogramworktask.md) &gt; [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md)
## CreateProgramWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

@ -9,8 +9,9 @@ Create Program
**Signature:** **Signature:**
```typescript ```typescript
export interface CreateProgramWorkTask export interface CreateProgramWorkTask extends BaseTask
``` ```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks ## Remarks
@ -20,7 +21,6 @@ An object representing the status of the program being created
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
| [programName](./bitburner.createprogramworktask.programname.md) | | string | | | [programName](./bitburner.createprogramworktask.programname.md) | | string | |
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | | | [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CrimeTask](./bitburner.crimetask.md) &gt; [cyclesWorked](./bitburner.crimetask.cyclesworked.md)
## CrimeTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

@ -9,8 +9,9 @@ Crime
**Signature:** **Signature:**
```typescript ```typescript
export interface CrimeTask export interface CrimeTask extends BaseTask
``` ```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks ## Remarks
@ -21,6 +22,5 @@ An object representing the crime being committed
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [crimeType](./bitburner.crimetask.crimetype.md) | | [CrimeType](./bitburner.crimetype.md) | | | [crimeType](./bitburner.crimetask.crimetype.md) | | [CrimeType](./bitburner.crimetype.md) | |
| [cyclesWorked](./bitburner.crimetask.cyclesworked.md) | | number | |
| [type](./bitburner.crimetask.type.md) | | "CRIME" | | | [type](./bitburner.crimetask.type.md) | | "CRIME" | |

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [FactionWorkTask](./bitburner.factionworktask.md) &gt; [cyclesWorked](./bitburner.factionworktask.cyclesworked.md)
## FactionWorkTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

@ -9,8 +9,9 @@ Faction Work
**Signature:** **Signature:**
```typescript ```typescript
export interface FactionWorkTask export interface FactionWorkTask extends BaseTask
``` ```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks ## Remarks
@ -20,7 +21,6 @@ An object representing the current work for a faction
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [cyclesWorked](./bitburner.factionworktask.cyclesworked.md) | | number | |
| [factionName](./bitburner.factionworktask.factionname.md) | | string | | | [factionName](./bitburner.factionworktask.factionname.md) | | string | |
| [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | | | [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | |
| [type](./bitburner.factionworktask.type.md) | | "FACTION" | | | [type](./bitburner.factionworktask.type.md) | | "FACTION" | |

@ -4,6 +4,8 @@
## GraftingTask.completion property ## GraftingTask.completion property
This promise resolves when the task is complete.
**Signature:** **Signature:**
```typescript ```typescript

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [GraftingTask](./bitburner.graftingtask.md) &gt; [cyclesWorked](./bitburner.graftingtask.cyclesworked.md)
## GraftingTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

@ -9,21 +9,19 @@ Grafting Work
**Signature:** **Signature:**
```typescript ```typescript
export interface GraftingTask export interface GraftingTask extends BaseTask
``` ```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks ## Remarks
An object representing the current grafting task An object representing the current grafting task
The "completion" property is a promise that resolves when the task is complete.
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [augmentation](./bitburner.graftingtask.augmentation.md) | | string | | | [augmentation](./bitburner.graftingtask.augmentation.md) | | string | |
| [completion](./bitburner.graftingtask.completion.md) | | Promise&lt;void&gt; | | | [completion](./bitburner.graftingtask.completion.md) | | Promise&lt;void&gt; | This promise resolves when the task is complete. |
| [cyclesWorked](./bitburner.graftingtask.cyclesworked.md) | | number | |
| [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | | | [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | |

@ -38,6 +38,7 @@
| [AugmentPair](./bitburner.augmentpair.md) | Return value of [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasableaugs.md) | | [AugmentPair](./bitburner.augmentpair.md) | Return value of [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasableaugs.md) |
| [AutocompleteData](./bitburner.autocompletedata.md) | Used for autocompletion | | [AutocompleteData](./bitburner.autocompletedata.md) | Used for autocompletion |
| [BackdoorRequirement](./bitburner.backdoorrequirement.md) | Player must have installed a backdoor on this server. | | [BackdoorRequirement](./bitburner.backdoorrequirement.md) | Player must have installed a backdoor on this server. |
| [BaseTask](./bitburner.basetask.md) | Base interface of all tasks. |
| [BasicHGWOptions](./bitburner.basichgwoptions.md) | Options to affect the behavior of [hack](./bitburner.ns.hack.md)<!-- -->, [grow](./bitburner.ns.grow.md)<!-- -->, and [weaken](./bitburner.ns.weaken.md)<!-- -->. | | [BasicHGWOptions](./bitburner.basichgwoptions.md) | Options to affect the behavior of [hack](./bitburner.ns.hack.md)<!-- -->, [grow](./bitburner.ns.grow.md)<!-- -->, and [weaken](./bitburner.ns.weaken.md)<!-- -->. |
| [BitNodeBooleanOptions](./bitburner.bitnodebooleanoptions.md) | <p>restrictHomePCUpgrade: The home computer's maximum RAM and number of cores are lower than normal. Max RAM: 128GB. Max core: 1.</p><p>disableSleeveExpAndAugmentation: Your Sleeves do not gain experience when they perform action. You also cannot buy augmentations for them.</p> | | [BitNodeBooleanOptions](./bitburner.bitnodebooleanoptions.md) | <p>restrictHomePCUpgrade: The home computer's maximum RAM and number of cores are lower than normal. Max RAM: 128GB. Max core: 1.</p><p>disableSleeveExpAndAugmentation: Your Sleeves do not gain experience when they perform action. You also cannot buy augmentations for them.</p> |
| [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) | All multipliers affecting the difficulty of the current challenge. | | [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) | All multipliers affecting the difficulty of the current challenge. |

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [StudyTask](./bitburner.studytask.md) &gt; [cyclesWorked](./bitburner.studytask.cyclesworked.md)
## StudyTask.cyclesWorked property
**Signature:**
```typescript
cyclesWorked: number;
```

@ -9,8 +9,9 @@ Study
**Signature:** **Signature:**
```typescript ```typescript
export interface StudyTask export interface StudyTask extends BaseTask
``` ```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks ## Remarks
@ -21,7 +22,6 @@ An object representing the current study task
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [classType](./bitburner.studytask.classtype.md) | | string | | | [classType](./bitburner.studytask.classtype.md) | | string | |
| [cyclesWorked](./bitburner.studytask.cyclesworked.md) | | number | |
| [location](./bitburner.studytask.location.md) | | [LocationName](./bitburner.locationname.md) \| \`${[LocationName](./bitburner.locationname.md)<!-- -->}\` | | | [location](./bitburner.studytask.location.md) | | [LocationName](./bitburner.locationname.md) \| \`${[LocationName](./bitburner.locationname.md)<!-- -->}\` | |
| [type](./bitburner.studytask.type.md) | | "CLASS" | | | [type](./bitburner.studytask.type.md) | | "CLASS" | |

@ -1647,62 +1647,80 @@ export interface TIX {
} }
/** /**
* Study * Base interface of all tasks.
* @remarks *
* An object representing the current study task
* @public * @public
*/ */
export interface StudyTask { export interface BaseTask {
type: "CLASS"; /**
* The number of game engine cycles that has passed since this task started. 1 engine cycle = 200ms.
*/
cyclesWorked: number; cyclesWorked: number;
}
/**
* Study
*
* @remarks
* An object representing the current study task
*
* @public
*/
export interface StudyTask extends BaseTask {
type: "CLASS";
classType: string; classType: string;
location: LocationName | `${LocationName}`; location: LocationName | `${LocationName}`;
} }
/** /**
* Company Work * Company Work
*
* @remarks * @remarks
* An object representing the current work for a company * An object representing the current work for a company
*
* @public * @public
*/ */
export interface CompanyWorkTask { export interface CompanyWorkTask extends BaseTask {
type: "COMPANY"; type: "COMPANY";
cyclesWorked: number;
companyName: CompanyName; companyName: CompanyName;
} }
/** /**
* Create Program * Create Program
*
* @remarks * @remarks
* An object representing the status of the program being created * An object representing the status of the program being created
*
* @public * @public
*/ */
export interface CreateProgramWorkTask { export interface CreateProgramWorkTask extends BaseTask {
type: "CREATE_PROGRAM"; type: "CREATE_PROGRAM";
cyclesWorked: number;
programName: string; programName: string;
} }
/** /**
* Crime * Crime
*
* @remarks * @remarks
* An object representing the crime being committed * An object representing the crime being committed
*
* @public * @public
*/ */
export interface CrimeTask { export interface CrimeTask extends BaseTask {
type: "CRIME"; type: "CRIME";
cyclesWorked: number;
crimeType: CrimeType; crimeType: CrimeType;
} }
/** /**
* Faction Work * Faction Work
*
* @remarks * @remarks
* An object representing the current work for a faction * An object representing the current work for a faction
*
* @public * @public
*/ */
export interface FactionWorkTask { export interface FactionWorkTask extends BaseTask {
type: "FACTION"; type: "FACTION";
cyclesWorked: number;
factionWorkType: FactionWorkType; factionWorkType: FactionWorkType;
factionName: string; factionName: string;
} }
@ -1713,21 +1731,23 @@ export interface FactionWorkTask {
* @remarks * @remarks
* An object representing the current grafting task * An object representing the current grafting task
* *
* The "completion" property is a promise that resolves when the task is complete.
*
* @public * @public
*/ */
export interface GraftingTask { export interface GraftingTask extends BaseTask {
type: "GRAFTING"; type: "GRAFTING";
cyclesWorked: number;
augmentation: string; augmentation: string;
/**
* This promise resolves when the task is complete.
*/
completion: Promise<void>; completion: Promise<void>;
} }
/** /**
* Task * Task
*
* @remarks * @remarks
* Represents any task, such as studying, working for a faction etc. * Represents any task, such as studying, working for a faction etc.
*
* @public * @public
*/ */
export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask; export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask;