diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index bc1328bb4..9855c3e34 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -3848,7 +3848,7 @@ export declare interface NS extends Singularity { * @param host - Host of target server. * @returns Returns the amount of time in milliseconds it takes to execute the weaken Netscript function. Returns Infinity if called on a Hacknet Server. */ - getWeakenTime(host: string): number; + getWeakenTime(host?: string): number; /** * Get the income of a script. diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index bc301b81e..054f01192 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -2012,7 +2012,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { return calculateGrowTime(server, Player) * 1000; }, - getWeakenTime: function (hostname: any): any { + getWeakenTime: function (hostname: any = workerScript.hostname): any { updateDynamicRam("getWeakenTime", getRamCost(Player, "getWeakenTime")); const server = safeGetServer(hostname, "getWeakenTime"); if (!(server instanceof Server)) {