mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
getWeakenTime should take an optional hostname
This commit is contained in:
parent
3e7a9ac896
commit
dc6432fa4e
2
dist/bitburner.d.ts
vendored
2
dist/bitburner.d.ts
vendored
@ -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.
|
||||
|
@ -2014,7 +2014,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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user