diff --git a/markdown/bitburner.ns.md b/markdown/bitburner.ns.md index b0fe3cc365..322855b241 100644 --- a/markdown/bitburner.ns.md +++ b/markdown/bitburner.ns.md @@ -157,6 +157,7 @@ export async function main(ns) { | [scriptRunning(script, host)](./bitburner.ns.scriptrunning.md) | Check if any script with a filename is running. | | [self()](./bitburner.ns.self.md) | Returns the currently running script. | | [serverExists(host)](./bitburner.ns.serverexists.md) | Returns a boolean denoting whether or not the specified server exists. | +| [setTailFontSize(pixel, pid)](./bitburner.ns.settailfontsize.md) | Set the font size of the tail window of a script. | | [setTitle(title, pid)](./bitburner.ns.settitle.md) | Set the title of the tail window of a script. | | [share()](./bitburner.ns.share.md) | Share the server's ram with your factions. | | [sleep(millis)](./bitburner.ns.sleep.md) | Suspends the script for n milliseconds. | diff --git a/markdown/bitburner.ns.settailfontsize.md b/markdown/bitburner.ns.settailfontsize.md new file mode 100644 index 0000000000..bf1ee56bb6 --- /dev/null +++ b/markdown/bitburner.ns.settailfontsize.md @@ -0,0 +1,37 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [setTailFontSize](./bitburner.ns.settailfontsize.md) + +## NS.setTailFontSize() method + +Set the font size of the tail window of a script. + +**Signature:** + +```typescript +setTailFontSize(pixel?: number, pid?: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| pixel | number | _(Optional)_ Optional. The new font size in pixels. If omitted, the default tail font size is used. | +| pid | number | _(Optional)_ Optional. PID of the script having its tail closed. If omitted, the current script is used. | + +**Returns:** + +void + +## Remarks + +RAM cost: 0 GB + +This overwrites the tail font size and forces an update of the tail window's contents. + +The font size is saved across restarts. + +If the pid is unspecified, it will modify the current script's logs. + +Otherwise, the pid argument can be used to change the logs from another script. + diff --git a/markdown/bitburner.runningscript.fontsize.md b/markdown/bitburner.runningscript.fontsize.md new file mode 100644 index 0000000000..08357f696f --- /dev/null +++ b/markdown/bitburner.runningscript.fontsize.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [RunningScript](./bitburner.runningscript.md) > [fontSize](./bitburner.runningscript.fontsize.md) + +## RunningScript.fontSize property + +The font size of the tail window. Defaults to the font size set in the style editor. + +**Signature:** + +```typescript +fontSize: number; +``` diff --git a/markdown/bitburner.runningscript.md b/markdown/bitburner.runningscript.md index 248b36545d..107aab46e6 100644 --- a/markdown/bitburner.runningscript.md +++ b/markdown/bitburner.runningscript.md @@ -18,6 +18,7 @@ interface RunningScript | [args](./bitburner.runningscript.args.md) | | [ScriptArg](./bitburner.scriptarg.md)\[\] | Arguments the script was called with | | [dynamicRamUsage](./bitburner.runningscript.dynamicramusage.md) | | number \| undefined |
The dynamic RAM usage of (one thread of) this script instance. Does not affect overall RAM consumption (ramUsage is for that), but rather shows how much of the reserved RAM is currently in use via all the ns functions the script has called. Initially 1.6GB, this increases as new functions are called.
Only set for scripts that are still running.
| | [filename](./bitburner.runningscript.filename.md) | | string | Filename of the script | +| [fontSize](./bitburner.runningscript.fontsize.md) | | number | The font size of the tail window. Defaults to the font size set in the style editor. | | [logs](./bitburner.runningscript.logs.md) | | string\[\] | Script logs as an array. The newest log entries are at the bottom. Timestamps, if enabled, are placed inside[brackets]
at the start of each line. |
| [offlineExpGained](./bitburner.runningscript.offlineexpgained.md) | | number | Total amount of hacking experience earned from this script when offline |
| [offlineMoneyMade](./bitburner.runningscript.offlinemoneymade.md) | | number | Total amount of money made by this script when offline |
diff --git a/src/Netscript/NetscriptHelpers.tsx b/src/Netscript/NetscriptHelpers.tsx
index 24c6dac7c9..ee81149ce4 100644
--- a/src/Netscript/NetscriptHelpers.tsx
+++ b/src/Netscript/NetscriptHelpers.tsx
@@ -749,6 +749,7 @@ function createPublicRunningScript(runningScript: RunningScript, workerScript?:
height: logProps.height,
},
title: runningScript.title,
+ fontSize: runningScript.fontSize,
threads: runningScript.threads,
temporary: runningScript.temporary,
};
diff --git a/src/Netscript/RamCostGenerator.ts b/src/Netscript/RamCostGenerator.ts
index 6f3cdbbe8c..0c565ac009 100644
--- a/src/Netscript/RamCostGenerator.ts
+++ b/src/Netscript/RamCostGenerator.ts
@@ -602,6 +602,7 @@ export const RamCosts: RamCostTree