mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
NETSCRIPT: Add ramOverride() function (#1346)
This adds a way to dynamically change the static RAM limit of a script, which is also its current RAM usage. This makes it possible for scripts to dynamically change their memory footprint, opening up new strategies beyond current ram-dodging. Calling functions still permanently increases the *dynamic* memory limit; RAM-dodging is still the optimal strategy for avoiding RAM costs, in that sense. This also adds dynamicRamUsage to the info returned by `getRunningScript`, to allow introspection on the currently needed ram.
This commit is contained in:
@@ -143,6 +143,7 @@ export async function main(ns) {
|
||||
| [prompt(txt, options)](./bitburner.ns.prompt.md) | Prompt the player with an input modal. |
|
||||
| [ps(host)](./bitburner.ns.ps.md) | List running scripts on a server. |
|
||||
| [purchaseServer(hostname, ram)](./bitburner.ns.purchaseserver.md) | Purchase a server. |
|
||||
| [ramOverride(ram)](./bitburner.ns.ramoverride.md) | Change the current static RAM allocation of the script. |
|
||||
| [read(filename)](./bitburner.ns.read.md) | Read content of a file. |
|
||||
| [readPort(portNumber)](./bitburner.ns.readport.md) | Read data from a port. |
|
||||
| [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. |
|
||||
|
||||
Reference in New Issue
Block a user