mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
NETSCRIPT: Add ramOverride as a RunOption (#441)
Allows overriding the static ram calculation. Dynamic ram limit still applies.
This commit is contained in:
15
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
15
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -203,6 +203,21 @@ interface RunOptions {
|
||||
threads?: number;
|
||||
/** Whether this script is excluded from saves, defaults to false */
|
||||
temporary?: boolean;
|
||||
/**
|
||||
* The RAM allocation to launch each thread of the script with.
|
||||
*
|
||||
* Lowering this will <i>not</i> automatically let you get away with using less RAM:
|
||||
* the dynamic RAM check enforces that all {@link NS} functions actually called incur their cost.
|
||||
* However, if you know that certain functions that are statically present (and thus included
|
||||
* in the static RAM cost) will never be called in a particular circumstance, you can use
|
||||
* this to avoid paying for them.
|
||||
*
|
||||
* You can also use this to <i>increase</i> the RAM if the static RAM checker has missed functions
|
||||
* that you need to call.
|
||||
*
|
||||
* Must be greater-or-equal to the base RAM cost. Defaults to the statically calculated cost.
|
||||
*/
|
||||
ramOverride?: number;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user