mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Added dark web functions to ns api
This commit is contained in:
64
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
64
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -2289,6 +2289,67 @@ export interface Singularity {
|
||||
* @returns True if the focus was changed.
|
||||
*/
|
||||
setFocus(focus: boolean): boolean;
|
||||
|
||||
/**
|
||||
* Get a list of programs offered on the dark web.
|
||||
* @remarks
|
||||
* RAM cost: 1 GB * 16/4/1
|
||||
*
|
||||
*
|
||||
* This function allows the player to get a list of programs available for purchase
|
||||
* on the dark web. Players MUST have purchased Tor to get the list of programs
|
||||
* available. If Tor has not been purchased yet, this function will return an
|
||||
* empty list.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS1
|
||||
* getDarkwebProgramsAvailable();
|
||||
* // returns ['BruteSSH.exe', 'FTPCrack.exe'...etc]
|
||||
* ```
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS2
|
||||
* ns.getDarkwebProgramsAvailable();
|
||||
* // returns ['BruteSSH.exe', 'FTPCrack.exe'...etc]
|
||||
* ```
|
||||
* @returns - a list of programs available for purchase on the dark web, or [] if Tor has not
|
||||
* been purchased
|
||||
*/
|
||||
getDarkwebPrograms(): string[];
|
||||
|
||||
/**
|
||||
* Check the price of an exploit on the dark web
|
||||
* @remarks
|
||||
* RAM cost: 0.5 GB * 16/4/1
|
||||
*
|
||||
*
|
||||
* This function allows you to check the price of a darkweb exploit/program.
|
||||
* You MUST have a TOR router in order to use this function. The price returned
|
||||
* by this function is the same price you would see with buy -l from the terminal.
|
||||
* Returns the cost of the program if it has not been purchased yet, 0 if it
|
||||
* has already been purchased, or -1 if Tor has not been purchased (and thus
|
||||
* the program/exploit is not available for purchase).
|
||||
*
|
||||
* If the program does not exist, an error is thrown.
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS1
|
||||
* getDarkwebProgramCost("brutessh.exe");
|
||||
* ```
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS2
|
||||
* ns.getDarkwebProgramCost("brutessh.exe");
|
||||
* ```
|
||||
* @param programName - Name of program to check the price of
|
||||
* @returns Price of the specified darkweb program
|
||||
* (if not yet purchased), 0 if it has already been purchased, or -1 if Tor has not been
|
||||
* purchased. Throws an error if the specified program/exploit does not exist
|
||||
*/
|
||||
getDarkwebProgramCost(programName: string): number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6674,8 +6735,7 @@ export interface Corporation extends WarehouseAPI, OfficeAPI {
|
||||
*
|
||||
* @returns Bonus time for the Corporation mechanic in milliseconds.
|
||||
*/
|
||||
getBonusTime(): number;
|
||||
|
||||
getBonusTime(): number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user