mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge pull request #4180 from Snarling/growthAnalyzeSecurityFix
NETSCRIPT: growthAnalyzeSecurity no longer fails if the optional cores parameter was omitted
This commit is contained in:
commit
5e4a393495
@ -308,10 +308,10 @@ const base: InternalAPI<NS> = {
|
|||||||
},
|
},
|
||||||
growthAnalyzeSecurity:
|
growthAnalyzeSecurity:
|
||||||
(ctx: NetscriptContext) =>
|
(ctx: NetscriptContext) =>
|
||||||
(_threads: unknown, _hostname?: unknown, _cores?: unknown): number => {
|
(_threads: unknown, _hostname?: unknown, _cores: unknown = 1): number => {
|
||||||
let threads = helpers.number(ctx, "threads", _threads);
|
let threads = helpers.number(ctx, "threads", _threads);
|
||||||
if (_hostname) {
|
if (_hostname) {
|
||||||
const cores = helpers.number(ctx, "cores", _cores) || 1;
|
const cores = helpers.number(ctx, "cores", _cores);
|
||||||
const hostname = helpers.string(ctx, "hostname", _hostname);
|
const hostname = helpers.string(ctx, "hostname", _hostname);
|
||||||
const server = helpers.getServer(ctx, hostname);
|
const server = helpers.getServer(ctx, hostname);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user