NETSCRIPT: Add ramOverride as a RunOption (#441)

Allows overriding the static ram calculation. Dynamic ram limit still applies.
This commit is contained in:
David Walker
2023-03-22 07:09:12 -07:00
committed by GitHub
parent a03a441906
commit 2b54c6c9b9
8 changed files with 75 additions and 37 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
real_document.completely_unused_field = undefined;
// set one to true and check that it affected the other.
real_document.completely_unused_field = true;
if (d.completely_unused_field && ctx.workerScript.ramUsage === RamCostConstants.Base) {
if (d.completely_unused_field && ctx.workerScript.scriptRef.ramUsage === RamCostConstants.Base) {
Player.giveExploit(Exploit.Bypass);
}
d.completely_unused_field = undefined;