mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Merge branch 'dev' into documentation-updates
This commit is contained in:
49
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
49
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -109,12 +109,6 @@ interface RunningScript {
|
||||
threads: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filename or PID of a script.
|
||||
* @public
|
||||
*/
|
||||
type FilenameOrPID = string | number;
|
||||
|
||||
/**
|
||||
* Data representing the internal values of a crime.
|
||||
* @public
|
||||
@@ -3965,6 +3959,36 @@ interface UserInterface {
|
||||
* RAM cost: cost: 0 GB
|
||||
*/
|
||||
resetTheme(): void;
|
||||
|
||||
/**
|
||||
* Get the current styles
|
||||
* @remarks
|
||||
* RAM cost: cost: 0 GB
|
||||
*
|
||||
* @returns An object containing the player's styles
|
||||
*/
|
||||
getStyles(): IStyleSettings;
|
||||
|
||||
/**
|
||||
* Sets the current styles
|
||||
* @remarks
|
||||
* RAM cost: cost: 0 GB
|
||||
* @example
|
||||
* Usage example (NS2)
|
||||
* ```ts
|
||||
* const styles = ns.ui.getStyles();
|
||||
* styles.fontFamily = 'Comic Sans Ms';
|
||||
* ns.ui.setStyles(styles);
|
||||
* ```
|
||||
*/
|
||||
setStyles(newStyles: IStyleSettings): void;
|
||||
|
||||
/**
|
||||
* Resets the player's styles to the default values
|
||||
* @remarks
|
||||
* RAM cost: cost: 0 GB
|
||||
*/
|
||||
resetStyles(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5719,7 +5743,7 @@ export interface NS extends Singularity {
|
||||
* @param args - Formating arguments.
|
||||
* @returns Formated text.
|
||||
*/
|
||||
sprintf(format: string, ...args: string[]): string;
|
||||
sprintf(format: string, ...args: any[]): string;
|
||||
|
||||
/**
|
||||
* Format a string with an array of arguments.
|
||||
@@ -5731,7 +5755,7 @@ export interface NS extends Singularity {
|
||||
* @param args - Formating arguments.
|
||||
* @returns Formated text.
|
||||
*/
|
||||
vsprintf(format: string, args: string[]): string;
|
||||
vsprintf(format: string, args: any[]): string;
|
||||
|
||||
/**
|
||||
* Format a number
|
||||
@@ -6443,3 +6467,12 @@ interface UserInterfaceTheme {
|
||||
backgroundsecondary: string;
|
||||
button: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface Styles
|
||||
* @internal
|
||||
*/
|
||||
interface IStyleSettings {
|
||||
fontFamily: string;
|
||||
lineHeight: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user