mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
BUGFIX: hacknetNodeCost formula API throws when using documented optional parameter (#2577)
This commit is contained in:
@@ -274,12 +274,14 @@ export function NetscriptFormulas(): InternalAPI<IFormulas> {
|
||||
checkFormulasAccess(ctx);
|
||||
return calculateCoreUpgradeCost(startingCore, extraCores, costMult);
|
||||
},
|
||||
hacknetNodeCost: (ctx) => (_n, _mult) => {
|
||||
const n = helpers.number(ctx, "n", _n);
|
||||
const mult = helpers.number(ctx, "mult", _mult);
|
||||
checkFormulasAccess(ctx);
|
||||
return calculateNodeCost(n, mult);
|
||||
},
|
||||
hacknetNodeCost:
|
||||
(ctx) =>
|
||||
(_n, _mult = 1) => {
|
||||
const n = helpers.number(ctx, "n", _n);
|
||||
const mult = helpers.number(ctx, "mult", _mult);
|
||||
checkFormulasAccess(ctx);
|
||||
return calculateNodeCost(n, mult);
|
||||
},
|
||||
constants: (ctx) => () => {
|
||||
checkFormulasAccess(ctx);
|
||||
return Object.assign({}, HacknetNodeConstants);
|
||||
|
||||
Reference in New Issue
Block a user