mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-20 06:33:49 +01:00
fix unknown
This commit is contained in:
parent
c38ab9e65f
commit
864816bd22
@ -585,10 +585,11 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
|
||||
return calculatePercentMoneyHacked(server, Player);
|
||||
},
|
||||
hackAnalyzeSecurity: function (_threads: unknown, hostname?: string): number {
|
||||
hackAnalyzeSecurity: function (_threads: unknown, _hostname?: unknown): number {
|
||||
updateDynamicRam("hackAnalyzeSecurity", getRamCost(Player, "hackAnalyzeSecurity"));
|
||||
let threads = helper.number("hackAnalyzeSecurity", "threads", _threads);
|
||||
if (hostname) {
|
||||
if (_hostname) {
|
||||
const hostname = helper.string("hackAnalyzeSecurity", "hostname", _hostname);
|
||||
const server = safeGetServer(hostname, "hackAnalyze");
|
||||
if (!(server instanceof Server)) {
|
||||
workerScript.log("hackAnalyzeSecurity", () => "Cannot be executed on this server.");
|
||||
|
Loading…
Reference in New Issue
Block a user