mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
fix static ram miscalc for stock market
This commit is contained in:
parent
49d807c9a9
commit
a7632aed29
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -162,10 +162,9 @@ async function parseOnlyRamCalculate(
|
|||||||
// Check if this identifier is a function in the workerScript environment.
|
// Check if this identifier is a function in the workerScript environment.
|
||||||
// If it is, then we need to get its RAM cost.
|
// If it is, then we need to get its RAM cost.
|
||||||
try {
|
try {
|
||||||
function applyFuncRam(func: any): number {
|
function applyFuncRam(cost: any): number {
|
||||||
console.log(func);
|
if (typeof cost === "number") {
|
||||||
if (typeof func === "number") {
|
return cost;
|
||||||
return func;
|
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -188,6 +187,8 @@ async function parseOnlyRamCalculate(
|
|||||||
func = workerScript.env.vars.gang[ref];
|
func = workerScript.env.vars.gang[ref];
|
||||||
} else if (ref in workerScript.env.vars.sleeve) {
|
} else if (ref in workerScript.env.vars.sleeve) {
|
||||||
func = workerScript.env.vars.sleeve[ref];
|
func = workerScript.env.vars.sleeve[ref];
|
||||||
|
} else if (ref in workerScript.env.vars.stock) {
|
||||||
|
func = workerScript.env.vars.stock[ref];
|
||||||
} else {
|
} else {
|
||||||
func = workerScript.env.vars[ref];
|
func = workerScript.env.vars[ref];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user