Skip to content

Commit

Permalink
DOCUMENTATION: Clarify cyclesWorked of Task (bitburner-official#1725)
Browse files Browse the repository at this point in the history
  • Loading branch information
catloversg authored Oct 23, 2024
1 parent 9a0400d commit f49d3b3
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 95 deletions.
13 changes: 13 additions & 0 deletions markdown/bitburner.basetask.cyclesworked.md
Original file line number Diff line number Diff line change
@@ -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;
```
20 changes: 20 additions & 0 deletions markdown/bitburner.basetask.md
Original file line number Diff line number Diff line change
@@ -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. |

11 changes: 0 additions & 11 deletions markdown/bitburner.companyworktask.cyclesworked.md

This file was deleted.

4 changes: 2 additions & 2 deletions markdown/bitburner.companyworktask.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Company Work
**Signature:**

```typescript
export interface CompanyWorkTask
export interface CompanyWorkTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
Expand All @@ -21,6 +22,5 @@ An object representing the current work for a company
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [companyName](./bitburner.companyworktask.companyname.md) | | [CompanyName](./bitburner.companyname.md) | |
| [cyclesWorked](./bitburner.companyworktask.cyclesworked.md) | | number | |
| [type](./bitburner.companyworktask.type.md) | | "COMPANY" | |
11 changes: 0 additions & 11 deletions markdown/bitburner.createprogramworktask.cyclesworked.md

This file was deleted.

4 changes: 2 additions & 2 deletions markdown/bitburner.createprogramworktask.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Create Program
**Signature:**

```typescript
export interface CreateProgramWorkTask
export interface CreateProgramWorkTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
Expand All @@ -20,7 +21,6 @@ An object representing the status of the program being created
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
| [programName](./bitburner.createprogramworktask.programname.md) | | string | |
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |
11 changes: 0 additions & 11 deletions markdown/bitburner.crimetask.cyclesworked.md

This file was deleted.

4 changes: 2 additions & 2 deletions markdown/bitburner.crimetask.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Crime
**Signature:**

```typescript
export interface CrimeTask
export interface CrimeTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
Expand All @@ -21,6 +22,5 @@ An object representing the crime being committed
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [crimeType](./bitburner.crimetask.crimetype.md) | | [CrimeType](./bitburner.crimetype.md) | |
| [cyclesWorked](./bitburner.crimetask.cyclesworked.md) | | number | |
| [type](./bitburner.crimetask.type.md) | | "CRIME" | |
11 changes: 0 additions & 11 deletions markdown/bitburner.factionworktask.cyclesworked.md

This file was deleted.

4 changes: 2 additions & 2 deletions markdown/bitburner.factionworktask.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Faction Work
**Signature:**

```typescript
export interface FactionWorkTask
export interface FactionWorkTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
Expand All @@ -20,7 +21,6 @@ An object representing the current work for a faction
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cyclesWorked](./bitburner.factionworktask.cyclesworked.md) | | number | |
| [factionName](./bitburner.factionworktask.factionname.md) | | string | |
| [factionWorkType](./bitburner.factionworktask.factionworktype.md) | | [FactionWorkType](./bitburner.factionworktype.md) | |
| [type](./bitburner.factionworktask.type.md) | | "FACTION" | |
Expand Down
2 changes: 2 additions & 0 deletions markdown/bitburner.graftingtask.completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## GraftingTask.completion property

This promise resolves when the task is complete.

**Signature:**

```typescript
Expand Down
11 changes: 0 additions & 11 deletions markdown/bitburner.graftingtask.cyclesworked.md

This file was deleted.

8 changes: 3 additions & 5 deletions markdown/bitburner.graftingtask.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ Grafting Work
**Signature:**

```typescript
export interface GraftingTask
export interface GraftingTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
An object representing the current grafting task
The "completion" property is a promise that resolves when the task is complete.

## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [augmentation](./bitburner.graftingtask.augmentation.md) | | string | |
| [completion](./bitburner.graftingtask.completion.md) | | Promise&lt;void&gt; | |
| [cyclesWorked](./bitburner.graftingtask.cyclesworked.md) | | number | |
| [completion](./bitburner.graftingtask.completion.md) | | Promise&lt;void&gt; | This promise resolves when the task is complete. |
| [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | |
1 change: 1 addition & 0 deletions markdown/bitburner.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
| [AugmentPair](./bitburner.augmentpair.md) | Return value of [getSleevePurchasableAugs](./bitburner.sleeve.getsleevepurchasableaugs.md) |
| [AutocompleteData](./bitburner.autocompletedata.md) | Used for autocompletion |
| [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)<!-- -->. |
| [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. |
Expand Down
11 changes: 0 additions & 11 deletions markdown/bitburner.studytask.cyclesworked.md

This file was deleted.

4 changes: 2 additions & 2 deletions markdown/bitburner.studytask.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Study
**Signature:**

```typescript
export interface StudyTask
export interface StudyTask extends BaseTask
```
**Extends:** [BaseTask](./bitburner.basetask.md)
## Remarks
Expand All @@ -21,7 +22,6 @@ An object representing the current study task
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [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)<!-- -->}\` | |
| [type](./bitburner.studytask.type.md) | | "CLASS" | |
48 changes: 34 additions & 14 deletions src/ScriptEditor/NetscriptDefinitions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1646,63 +1646,81 @@ export interface TIX {
nextUpdate(): Promise<number>;
}

/**
* Base interface of all tasks.
*
* @public
*/
export interface BaseTask {
/**
* The number of game engine cycles that has passed since this task started. 1 engine cycle = 200ms.
*/
cyclesWorked: number;
}

/**
* Study
*
* @remarks
* An object representing the current study task
*
* @public
*/
export interface StudyTask {
export interface StudyTask extends BaseTask {
type: "CLASS";
cyclesWorked: number;
classType: string;
location: LocationName | `${LocationName}`;
}

/**
* Company Work
*
* @remarks
* An object representing the current work for a company
*
* @public
*/
export interface CompanyWorkTask {
export interface CompanyWorkTask extends BaseTask {
type: "COMPANY";
cyclesWorked: number;
companyName: CompanyName;
}

/**
* Create Program
*
* @remarks
* An object representing the status of the program being created
*
* @public
*/
export interface CreateProgramWorkTask {
export interface CreateProgramWorkTask extends BaseTask {
type: "CREATE_PROGRAM";
cyclesWorked: number;
programName: string;
}

/**
* Crime
*
* @remarks
* An object representing the crime being committed
*
* @public
*/
export interface CrimeTask {
export interface CrimeTask extends BaseTask {
type: "CRIME";
cyclesWorked: number;
crimeType: CrimeType;
}

/**
* Faction Work
*
* @remarks
* An object representing the current work for a faction
*
* @public
*/
export interface FactionWorkTask {
export interface FactionWorkTask extends BaseTask {
type: "FACTION";
cyclesWorked: number;
factionWorkType: FactionWorkType;
factionName: string;
}
Expand All @@ -1713,21 +1731,23 @@ export interface FactionWorkTask {
* @remarks
* An object representing the current grafting task
*
* The "completion" property is a promise that resolves when the task is complete.
*
* @public
*/
export interface GraftingTask {
export interface GraftingTask extends BaseTask {
type: "GRAFTING";
cyclesWorked: number;
augmentation: string;
/**
* This promise resolves when the task is complete.
*/
completion: Promise<void>;
}

/**
* Task
*
* @remarks
* Represents any task, such as studying, working for a faction etc.
*
* @public
*/
export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask;
Expand Down

0 comments on commit f49d3b3

Please sign in to comment.