mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
Amending NetscriptDefinitions
This commit is contained in:
17
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
17
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -5878,19 +5878,22 @@ export interface NS extends Singularity {
|
||||
tFormat(milliseconds: number, milliPrecision?: boolean): string;
|
||||
|
||||
/**
|
||||
* Prompt the player with a Yes/No modal.
|
||||
* Prompt the player with an input modal.
|
||||
* @remarks
|
||||
* RAM cost: 0 GB
|
||||
*
|
||||
* Prompts the player with a dialog box with two options: “Yes” and “No”.
|
||||
* This function will return true if the player click “Yes” and false if
|
||||
* the player clicks “No”. The script’s execution is halted until the player
|
||||
* selects one of the options.
|
||||
* Prompts the player with a dialog box. If `options.type` is undefined or "boolean",
|
||||
* the player is shown "Yes" and "No" prompts, which return true and false respectively.
|
||||
* Passing a type of "text" will give the player a text field and a value of "select"
|
||||
* will show a drop-down field. Choosing type "select" will require an array or object
|
||||
* to be passed via the `options.choices` property.
|
||||
* The script’s execution is halted until the player selects one of the options.
|
||||
*
|
||||
* @param txt - Text to appear in the prompt dialog box.
|
||||
* @returns True if the player click “Yes” and false if the player clicks “No”.
|
||||
* @param options - Options to modify the prompt the player is shown.
|
||||
* @returns True if the player click “Yes”; false if the player clicks “No”; or the value entered by the player.
|
||||
*/
|
||||
prompt(txt: string): Promise<boolean>;
|
||||
prompt(txt: string, options?: { type?: "boolean"|"text"|"select"|undefined; choices?: string[] | { [key: string]: string | number } }): Promise<boolean | string>;
|
||||
|
||||
/**
|
||||
* Open up a message box.
|
||||
|
||||
Reference in New Issue
Block a user