mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
API: Add ns.singularity.getHackingLevelRequirementOfProgram (#2271)
This commit is contained in:
27
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
27
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -2418,17 +2418,9 @@ export interface Singularity {
|
||||
*
|
||||
* This function returns true if you successfully start working on the specified program, and false otherwise.
|
||||
*
|
||||
* Note that creating a program using this function has the same hacking level requirements as it normally would.
|
||||
* These level requirements are:<br/>
|
||||
* - BruteSSH.exe: 50<br/>
|
||||
* - FTPCrack.exe: 100<br/>
|
||||
* - relaySMTP.exe: 250<br/>
|
||||
* - HTTPWorm.exe: 500<br/>
|
||||
* - SQLInject.exe: 750<br/>
|
||||
* - DeepscanV1.exe: 75<br/>
|
||||
* - DeepscanV2.exe: 400<br/>
|
||||
* - ServerProfiler.exe: 75<br/>
|
||||
* - AutoLink.exe: 25
|
||||
* Note that creating a program using this function has the same hacking level requirements as it normally would. You
|
||||
* can call {@link Singularity.getHackingLevelRequirementOfProgram | getHackingLevelRequirementOfProgram} to get that
|
||||
* value.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
@@ -2442,6 +2434,19 @@ export interface Singularity {
|
||||
*/
|
||||
createProgram(program: string, focus?: boolean): boolean;
|
||||
|
||||
/**
|
||||
* Get the hacking level requirement of a program.
|
||||
* @remarks
|
||||
* RAM cost: 5 GB * 16/4/1
|
||||
*
|
||||
* In order to create a program via UI or {@link Singularity.createProgram | createProgram}, your hacking level must
|
||||
* meet the requirement of that program. This API returns that value.
|
||||
*
|
||||
* @param program - Name of program to create.
|
||||
* @returns Hacking level requirement. Return Infinity if the specified program cannot be created.
|
||||
*/
|
||||
getHackingLevelRequirementOfProgram(program: string): number;
|
||||
|
||||
/**
|
||||
* Commit a crime.
|
||||
* @remarks
|
||||
|
||||
Reference in New Issue
Block a user