mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
API: Updating typing for ns.singularity.getCurrentWork() (#989)
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user