mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-08 08:43:53 +01:00
API: Updating typing for ns.singularity.getCurrentWork() (#989)
This commit is contained in:
parent
550829a1c3
commit
eba840dcd3
11
markdown/bitburner.companyworktask.companyname.md
Normal file
11
markdown/bitburner.companyworktask.companyname.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) > [CompanyWorkTask](./bitburner.companyworktask.md) > [companyName](./bitburner.companyworktask.companyname.md)
|
||||
|
||||
## CompanyWorkTask.companyName property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
companyName: CompanyName;
|
||||
```
|
11
markdown/bitburner.companyworktask.cyclesworked.md
Normal file
11
markdown/bitburner.companyworktask.cyclesworked.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) > [CompanyWorkTask](./bitburner.companyworktask.md) > [cyclesWorked](./bitburner.companyworktask.cyclesworked.md)
|
||||
|
||||
## CompanyWorkTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
26
markdown/bitburner.companyworktask.md
Normal file
26
markdown/bitburner.companyworktask.md
Normal file
@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CompanyWorkTask](./bitburner.companyworktask.md)
|
||||
|
||||
## CompanyWorkTask interface
|
||||
|
||||
Company Work
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface CompanyWorkTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current work for a company
|
||||
|
||||
## Properties
|
||||
|
||||
| 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
markdown/bitburner.companyworktask.type.md
Normal file
11
markdown/bitburner.companyworktask.type.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) > [CompanyWorkTask](./bitburner.companyworktask.md) > [type](./bitburner.companyworktask.type.md)
|
||||
|
||||
## CompanyWorkTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "COMPANY";
|
||||
```
|
11
markdown/bitburner.createprogramworktask.cyclesworked.md
Normal file
11
markdown/bitburner.createprogramworktask.cyclesworked.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) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md) > [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md)
|
||||
|
||||
## CreateProgramWorkTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
26
markdown/bitburner.createprogramworktask.md
Normal file
26
markdown/bitburner.createprogramworktask.md
Normal file
@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md)
|
||||
|
||||
## CreateProgramWorkTask interface
|
||||
|
||||
Create Program
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface CreateProgramWorkTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the status of the program being created
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [cyclesWorked](./bitburner.createprogramworktask.cyclesworked.md) | | number | |
|
||||
| [programName](./bitburner.createprogramworktask.programname.md) | | string | |
|
||||
| [type](./bitburner.createprogramworktask.type.md) | | "CREATE\_PROGRAM" | |
|
||||
|
11
markdown/bitburner.createprogramworktask.programname.md
Normal file
11
markdown/bitburner.createprogramworktask.programname.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) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md) > [programName](./bitburner.createprogramworktask.programname.md)
|
||||
|
||||
## CreateProgramWorkTask.programName property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
programName: string;
|
||||
```
|
11
markdown/bitburner.createprogramworktask.type.md
Normal file
11
markdown/bitburner.createprogramworktask.type.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) > [CreateProgramWorkTask](./bitburner.createprogramworktask.md) > [type](./bitburner.createprogramworktask.type.md)
|
||||
|
||||
## CreateProgramWorkTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "CREATE_PROGRAM";
|
||||
```
|
11
markdown/bitburner.crimetask.crimetype.md
Normal file
11
markdown/bitburner.crimetask.crimetype.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) > [CrimeTask](./bitburner.crimetask.md) > [crimeType](./bitburner.crimetask.crimetype.md)
|
||||
|
||||
## CrimeTask.crimeType property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
crimeType: CrimeType;
|
||||
```
|
11
markdown/bitburner.crimetask.cyclesworked.md
Normal file
11
markdown/bitburner.crimetask.cyclesworked.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) > [CrimeTask](./bitburner.crimetask.md) > [cyclesWorked](./bitburner.crimetask.cyclesworked.md)
|
||||
|
||||
## CrimeTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
26
markdown/bitburner.crimetask.md
Normal file
26
markdown/bitburner.crimetask.md
Normal file
@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [CrimeTask](./bitburner.crimetask.md)
|
||||
|
||||
## CrimeTask interface
|
||||
|
||||
Crime
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface CrimeTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the crime being commited
|
||||
|
||||
## Properties
|
||||
|
||||
| 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
markdown/bitburner.crimetask.type.md
Normal file
11
markdown/bitburner.crimetask.type.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) > [CrimeTask](./bitburner.crimetask.md) > [type](./bitburner.crimetask.type.md)
|
||||
|
||||
## CrimeTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "CRIME";
|
||||
```
|
11
markdown/bitburner.factionworktask.cyclesworked.md
Normal file
11
markdown/bitburner.factionworktask.cyclesworked.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) > [FactionWorkTask](./bitburner.factionworktask.md) > [cyclesWorked](./bitburner.factionworktask.cyclesworked.md)
|
||||
|
||||
## FactionWorkTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
11
markdown/bitburner.factionworktask.factionname.md
Normal file
11
markdown/bitburner.factionworktask.factionname.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) > [FactionWorkTask](./bitburner.factionworktask.md) > [factionName](./bitburner.factionworktask.factionname.md)
|
||||
|
||||
## FactionWorkTask.factionName property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
factionName: string;
|
||||
```
|
11
markdown/bitburner.factionworktask.factionworktype.md
Normal file
11
markdown/bitburner.factionworktask.factionworktype.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) > [FactionWorkTask](./bitburner.factionworktask.md) > [factionWorkType](./bitburner.factionworktask.factionworktype.md)
|
||||
|
||||
## FactionWorkTask.factionWorkType property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
factionWorkType: FactionWorkType;
|
||||
```
|
27
markdown/bitburner.factionworktask.md
Normal file
27
markdown/bitburner.factionworktask.md
Normal file
@ -0,0 +1,27 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [FactionWorkTask](./bitburner.factionworktask.md)
|
||||
|
||||
## FactionWorkTask interface
|
||||
|
||||
Faction Work
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface FactionWorkTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current work for a faction
|
||||
|
||||
## Properties
|
||||
|
||||
| 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" | |
|
||||
|
11
markdown/bitburner.factionworktask.type.md
Normal file
11
markdown/bitburner.factionworktask.type.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) > [FactionWorkTask](./bitburner.factionworktask.md) > [type](./bitburner.factionworktask.type.md)
|
||||
|
||||
## FactionWorkTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "FACTION";
|
||||
```
|
11
markdown/bitburner.graftingtask.augmentation.md
Normal file
11
markdown/bitburner.graftingtask.augmentation.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) > [augmentation](./bitburner.graftingtask.augmentation.md)
|
||||
|
||||
## GraftingTask.augmentation property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
augmentation: string;
|
||||
```
|
11
markdown/bitburner.graftingtask.cyclesworked.md
Normal file
11
markdown/bitburner.graftingtask.cyclesworked.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) > [cyclesWorked](./bitburner.graftingtask.cyclesworked.md)
|
||||
|
||||
## GraftingTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
26
markdown/bitburner.graftingtask.md
Normal file
26
markdown/bitburner.graftingtask.md
Normal file
@ -0,0 +1,26 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [GraftingTask](./bitburner.graftingtask.md)
|
||||
|
||||
## GraftingTask interface
|
||||
|
||||
Faction Work
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface GraftingTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current grafting status
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [augmentation](./bitburner.graftingtask.augmentation.md) | | string | |
|
||||
| [cyclesWorked](./bitburner.graftingtask.cyclesworked.md) | | number | |
|
||||
| [type](./bitburner.graftingtask.type.md) | | "GRAFTING" | |
|
||||
|
11
markdown/bitburner.graftingtask.type.md
Normal file
11
markdown/bitburner.graftingtask.type.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) > [type](./bitburner.graftingtask.type.md)
|
||||
|
||||
## GraftingTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "GRAFTING";
|
||||
```
|
@ -39,18 +39,22 @@
|
||||
| [CodingContract](./bitburner.codingcontract.md) | Coding Contract API |
|
||||
| [CompanyPositionInfo](./bitburner.companypositioninfo.md) | Company position requirements and salary. |
|
||||
| [CompanyReputationRequirement](./bitburner.companyreputationrequirement.md) | Player must have at least this much reputation with this company. |
|
||||
| [CompanyWorkTask](./bitburner.companyworktask.md) | Company Work |
|
||||
| [CorpConstants](./bitburner.corpconstants.md) | Corporation related constants |
|
||||
| [CorpIndustryData](./bitburner.corpindustrydata.md) | Data for an individual industry |
|
||||
| [CorpMaterialConstantData](./bitburner.corpmaterialconstantdata.md) | Corporation material information |
|
||||
| [Corporation](./bitburner.corporation.md) | Corporation API |
|
||||
| [CorporationInfo](./bitburner.corporationinfo.md) | General info about a corporation |
|
||||
| [CorpProductData](./bitburner.corpproductdata.md) | Product rating information |
|
||||
| [CreateProgramWorkTask](./bitburner.createprogramworktask.md) | Create Program |
|
||||
| [CrimeStats](./bitburner.crimestats.md) | Data representing the internal values of a crime. |
|
||||
| [CrimeTask](./bitburner.crimetask.md) | Crime |
|
||||
| [Division](./bitburner.division.md) | Corporation division |
|
||||
| [EmployedByRequirement](./bitburner.employedbyrequirement.md) | Player must be working for this company. |
|
||||
| [EquipmentStats](./bitburner.equipmentstats.md) | Object representing data representing a gang member equipment. |
|
||||
| [EveryRequirement](./bitburner.everyrequirement.md) | All sub-conditions must be satisfied. |
|
||||
| [Export](./bitburner.export.md) | Export order for a material |
|
||||
| [FactionWorkTask](./bitburner.factionworktask.md) | Faction Work |
|
||||
| [FileRequirement](./bitburner.filerequirement.md) | Player must have a specific Literature or Message file on their home computer. |
|
||||
| [Formulas](./bitburner.formulas.md) | Formulas API |
|
||||
| [Fragment](./bitburner.fragment.md) | |
|
||||
@ -66,6 +70,7 @@
|
||||
| [GangTerritory](./bitburner.gangterritory.md) | |
|
||||
| [Go](./bitburner.go.md) | IPvGO api |
|
||||
| [Grafting](./bitburner.grafting.md) | Grafting API |
|
||||
| [GraftingTask](./bitburner.graftingtask.md) | Faction Work |
|
||||
| [HackingFormulas](./bitburner.hackingformulas.md) | Hacking formulas |
|
||||
| [HackingMultipliers](./bitburner.hackingmultipliers.md) | Hack related multipliers. |
|
||||
| [Hacknet](./bitburner.hacknet.md) | Hacknet API |
|
||||
@ -127,6 +132,7 @@
|
||||
| [StockMarketConstants](./bitburner.stockmarketconstants.md) | Constants used for the stockmarket game mechanic. |
|
||||
| [StockOrder](./bitburner.stockorder.md) | <p>Return value of [getOrders](./bitburner.tix.getorders.md)</p><p>Keys are stock symbols, properties are arrays of [StockOrderObject](./bitburner.stockorderobject.md)</p> |
|
||||
| [StockOrderObject](./bitburner.stockorderobject.md) | Value in map of [StockOrder](./bitburner.stockorder.md) |
|
||||
| [StudyTask](./bitburner.studytask.md) | Study |
|
||||
| [TailProperties](./bitburner.tailproperties.md) | |
|
||||
| [TIX](./bitburner.tix.md) | Stock market API |
|
||||
| [UserInterface](./bitburner.userinterface.md) | User Interface API. |
|
||||
@ -166,4 +172,5 @@
|
||||
| [SleeveSupportTask](./bitburner.sleevesupporttask.md) | |
|
||||
| [SleeveSynchroTask](./bitburner.sleevesynchrotask.md) | |
|
||||
| [SleeveTask](./bitburner.sleevetask.md) | Object representing a sleeve current task. |
|
||||
| [Task](./bitburner.task.md) | Task |
|
||||
|
||||
|
@ -9,11 +9,11 @@ Get the current work the player is doing.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getCurrentWork(): any | null;
|
||||
getCurrentWork(): Task | null;
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
any \| null
|
||||
[Task](./bitburner.task.md) \| null
|
||||
|
||||
- An object representing the current work. Fields depend on the kind of work.
|
||||
|
||||
|
11
markdown/bitburner.studytask.classtype.md
Normal file
11
markdown/bitburner.studytask.classtype.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) > [StudyTask](./bitburner.studytask.md) > [classType](./bitburner.studytask.classtype.md)
|
||||
|
||||
## StudyTask.classType property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
classType: string;
|
||||
```
|
11
markdown/bitburner.studytask.cyclesworked.md
Normal file
11
markdown/bitburner.studytask.cyclesworked.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) > [StudyTask](./bitburner.studytask.md) > [cyclesWorked](./bitburner.studytask.cyclesworked.md)
|
||||
|
||||
## StudyTask.cyclesWorked property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
cyclesWorked: number;
|
||||
```
|
11
markdown/bitburner.studytask.location.md
Normal file
11
markdown/bitburner.studytask.location.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) > [StudyTask](./bitburner.studytask.md) > [location](./bitburner.studytask.location.md)
|
||||
|
||||
## StudyTask.location property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
location: string;
|
||||
```
|
27
markdown/bitburner.studytask.md
Normal file
27
markdown/bitburner.studytask.md
Normal file
@ -0,0 +1,27 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [StudyTask](./bitburner.studytask.md)
|
||||
|
||||
## StudyTask interface
|
||||
|
||||
Study
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export interface StudyTask
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
An object representing the current study task
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [classType](./bitburner.studytask.classtype.md) | | string | |
|
||||
| [cyclesWorked](./bitburner.studytask.cyclesworked.md) | | number | |
|
||||
| [location](./bitburner.studytask.location.md) | | string | |
|
||||
| [type](./bitburner.studytask.type.md) | | "CLASS" | |
|
||||
|
11
markdown/bitburner.studytask.type.md
Normal file
11
markdown/bitburner.studytask.type.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) > [StudyTask](./bitburner.studytask.md) > [type](./bitburner.studytask.type.md)
|
||||
|
||||
## StudyTask.type property
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
type: "CLASS";
|
||||
```
|
19
markdown/bitburner.task.md
Normal file
19
markdown/bitburner.task.md
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Task](./bitburner.task.md)
|
||||
|
||||
## Task type
|
||||
|
||||
Task
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask;
|
||||
```
|
||||
**References:** [StudyTask](./bitburner.studytask.md)<!-- -->, [CompanyWorkTask](./bitburner.companyworktask.md)<!-- -->, [CreateProgramWorkTask](./bitburner.createprogramworktask.md)<!-- -->, [CrimeTask](./bitburner.crimetask.md)<!-- -->, [FactionWorkTask](./bitburner.factionworktask.md)<!-- -->, [GraftingTask](./bitburner.graftingtask.md)
|
||||
|
||||
## Remarks
|
||||
|
||||
Represents any task, such as studying, working for a faction etc.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Singularity as ISingularity } from "@nsdefs";
|
||||
import type { Singularity as ISingularity, Task as ITask } from "@nsdefs";
|
||||
|
||||
import { Player } from "@player";
|
||||
import {
|
||||
@ -1137,7 +1137,7 @@ export function NetscriptSingularity(): InternalAPI<ISingularity> {
|
||||
getCurrentWork: (ctx) => () => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
if (!Player.currentWork) return null;
|
||||
return Player.currentWork.APICopy();
|
||||
return Player.currentWork.APICopy() as ITask;
|
||||
},
|
||||
exportGame: (ctx) => () => {
|
||||
helpers.checkSingularityAccess(ctx);
|
||||
|
@ -81,7 +81,7 @@ export class SleeveBladeburnerWork extends SleeveWorkClass {
|
||||
|
||||
APICopy(sleeve: Sleeve) {
|
||||
return {
|
||||
type: SleeveWorkType.BLADEBURNER as "BLADEBURNER",
|
||||
type: SleeveWorkType.BLADEBURNER as const,
|
||||
actionType: this.actionType,
|
||||
actionName: this.actionName,
|
||||
tasksCompleted: this.tasksCompleted,
|
||||
|
@ -42,7 +42,7 @@ export class SleeveClassWork extends SleeveWorkClass {
|
||||
|
||||
APICopy() {
|
||||
return {
|
||||
type: SleeveWorkType.CLASS as "CLASS",
|
||||
type: SleeveWorkType.CLASS as const,
|
||||
classType: this.classType,
|
||||
location: this.location,
|
||||
};
|
||||
|
@ -49,7 +49,7 @@ export class SleeveCompanyWork extends SleeveWorkClass {
|
||||
|
||||
APICopy() {
|
||||
return {
|
||||
type: SleeveWorkType.COMPANY as "COMPANY",
|
||||
type: SleeveWorkType.COMPANY as const,
|
||||
companyName: this.companyName,
|
||||
};
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export class SleeveCrimeWork extends SleeveWorkClass {
|
||||
|
||||
APICopy() {
|
||||
return {
|
||||
type: SleeveWorkType.CRIME as "CRIME",
|
||||
type: SleeveWorkType.CRIME as const,
|
||||
crimeType: this.crimeType,
|
||||
tasksCompleted: this.tasksCompleted,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
|
@ -53,7 +53,7 @@ export class SleeveFactionWork extends SleeveWorkClass {
|
||||
|
||||
APICopy() {
|
||||
return {
|
||||
type: SleeveWorkType.FACTION as "FACTION",
|
||||
type: SleeveWorkType.FACTION as const,
|
||||
factionWorkType: this.factionWorkType,
|
||||
factionName: this.factionName,
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ export class SleeveInfiltrateWork extends SleeveWorkClass {
|
||||
|
||||
APICopy() {
|
||||
return {
|
||||
type: SleeveWorkType.INFILTRATE as "INFILTRATE",
|
||||
type: SleeveWorkType.INFILTRATE as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
cyclesNeeded: this.cyclesNeeded(),
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ export class SleeveRecoveryWork extends SleeveWorkClass {
|
||||
}
|
||||
|
||||
APICopy() {
|
||||
return { type: SleeveWorkType.RECOVERY as "RECOVERY" };
|
||||
return { type: SleeveWorkType.RECOVERY as const };
|
||||
}
|
||||
|
||||
/** Serialize the current object to a JSON save state. */
|
||||
|
@ -21,7 +21,7 @@ export class SleeveSupportWork extends SleeveWorkClass {
|
||||
}
|
||||
|
||||
APICopy() {
|
||||
return { type: SleeveWorkType.SUPPORT as "SUPPORT" };
|
||||
return { type: SleeveWorkType.SUPPORT as const };
|
||||
}
|
||||
|
||||
/** Serialize the current object to a JSON save state. */
|
||||
|
@ -19,7 +19,7 @@ export class SleeveSynchroWork extends SleeveWorkClass {
|
||||
}
|
||||
|
||||
APICopy() {
|
||||
return { type: SleeveWorkType.SYNCHRO as "SYNCHRO" };
|
||||
return { type: SleeveWorkType.SYNCHRO as const };
|
||||
}
|
||||
|
||||
/** Serialize the current object to a JSON save state. */
|
||||
|
83
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
83
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -1579,6 +1579,87 @@ export interface TIX {
|
||||
nextUpdate(): Promise<number>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Study
|
||||
* @remarks
|
||||
* An object representing the current study task
|
||||
* @public
|
||||
*/
|
||||
export interface StudyTask {
|
||||
type: "CLASS";
|
||||
cyclesWorked: number;
|
||||
classType: string;
|
||||
location: string;
|
||||
}
|
||||
/**
|
||||
* Company Work
|
||||
* @remarks
|
||||
* An object representing the current work for a company
|
||||
* @public
|
||||
*/
|
||||
export interface CompanyWorkTask {
|
||||
type: "COMPANY";
|
||||
cyclesWorked: number;
|
||||
companyName: CompanyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Program
|
||||
* @remarks
|
||||
* An object representing the status of the program being created
|
||||
* @public
|
||||
*/
|
||||
export interface CreateProgramWorkTask {
|
||||
type: "CREATE_PROGRAM";
|
||||
cyclesWorked: number;
|
||||
programName: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crime
|
||||
* @remarks
|
||||
* An object representing the crime being commited
|
||||
* @public
|
||||
*/
|
||||
export interface CrimeTask {
|
||||
type: "CRIME";
|
||||
cyclesWorked: number;
|
||||
crimeType: CrimeType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Faction Work
|
||||
* @remarks
|
||||
* An object representing the current work for a faction
|
||||
* @public
|
||||
*/
|
||||
export interface FactionWorkTask {
|
||||
type: "FACTION";
|
||||
cyclesWorked: number;
|
||||
factionWorkType: FactionWorkType;
|
||||
factionName: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Faction Work
|
||||
* @remarks
|
||||
* An object representing the current grafting status
|
||||
* @public
|
||||
*/
|
||||
export interface GraftingTask {
|
||||
type: "GRAFTING";
|
||||
cyclesWorked: number;
|
||||
augmentation: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Task
|
||||
* @remarks
|
||||
* Represents any task, such as studying, working for a faction etc.
|
||||
* @public
|
||||
*/
|
||||
export type Task = StudyTask | CompanyWorkTask | CreateProgramWorkTask | CrimeTask | FactionWorkTask | GraftingTask;
|
||||
|
||||
/**
|
||||
* Singularity API
|
||||
* @remarks
|
||||
@ -2487,7 +2568,7 @@ export interface Singularity {
|
||||
*
|
||||
* @returns - An object representing the current work. Fields depend on the kind of work.
|
||||
*/
|
||||
getCurrentWork(): any | null;
|
||||
getCurrentWork(): Task | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,7 +79,6 @@ interface ClassWorkParams {
|
||||
}
|
||||
|
||||
export const isClassWork = (w: Work | null): w is ClassWork => w !== null && w.type === WorkType.CLASS;
|
||||
|
||||
export class ClassWork extends Work {
|
||||
classType: ClassType;
|
||||
location: LocationName;
|
||||
@ -132,9 +131,9 @@ export class ClassWork extends Work {
|
||||
}
|
||||
}
|
||||
|
||||
APICopy(): Record<string, unknown> {
|
||||
APICopy() {
|
||||
return {
|
||||
type: this.type,
|
||||
type: WorkType.CLASS as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
classType: this.classType,
|
||||
location: this.location,
|
||||
|
@ -61,9 +61,9 @@ export class CompanyWork extends Work {
|
||||
}
|
||||
}
|
||||
|
||||
APICopy(): Record<string, unknown> {
|
||||
APICopy() {
|
||||
return {
|
||||
type: this.type,
|
||||
type: WorkType.COMPANY as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
companyName: this.companyName,
|
||||
};
|
||||
|
@ -96,9 +96,9 @@ export class CreateProgramWork extends Work {
|
||||
}
|
||||
}
|
||||
|
||||
APICopy(): Record<string, unknown> {
|
||||
APICopy() {
|
||||
return {
|
||||
type: this.type,
|
||||
type: WorkType.CREATE_PROGRAM as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
programName: this.programName,
|
||||
};
|
||||
|
@ -82,9 +82,9 @@ export class CrimeWork extends Work {
|
||||
/** nothing to do */
|
||||
}
|
||||
|
||||
APICopy(): Record<string, unknown> {
|
||||
APICopy() {
|
||||
return {
|
||||
type: this.type,
|
||||
type: WorkType.CRIME as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
crimeType: this.crimeType,
|
||||
};
|
||||
|
@ -67,9 +67,9 @@ export class FactionWork extends Work {
|
||||
}
|
||||
}
|
||||
|
||||
APICopy(): Record<string, unknown> {
|
||||
APICopy() {
|
||||
return {
|
||||
type: this.type,
|
||||
type: WorkType.FACTION as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
factionWorkType: this.factionWorkType,
|
||||
factionName: this.factionName,
|
||||
|
@ -79,9 +79,9 @@ export class GraftingWork extends Work {
|
||||
}
|
||||
}
|
||||
|
||||
APICopy(): Record<string, unknown> {
|
||||
APICopy() {
|
||||
return {
|
||||
type: this.type,
|
||||
type: WorkType.GRAFTING as const,
|
||||
cyclesWorked: this.cyclesWorked,
|
||||
augmentation: this.augmentation,
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IReviverValue } from "../utils/JSONReviver";
|
||||
import type { IReviverValue } from "../utils/JSONReviver";
|
||||
import type { Task } from "@nsdefs";
|
||||
|
||||
export abstract class Work {
|
||||
type: WorkType;
|
||||
@ -13,7 +14,7 @@ export abstract class Work {
|
||||
|
||||
abstract process(cycles: number): boolean;
|
||||
abstract finish(cancelled: boolean, suppressDialog?: boolean): void;
|
||||
abstract APICopy(): Record<string, unknown>;
|
||||
abstract APICopy(): Task;
|
||||
abstract toJSON(): IReviverValue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user