diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index b047aba7e..bc301b81e 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -172,7 +172,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { throw makeRuntimeRejectMsg( workerScript, `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` + - `This is probably a bug. Please report to game developer`, + `This is probably a bug. Please report to game developer`, ); } @@ -432,8 +432,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { throw makeRuntimeErrorMsg(funcName, `${argName} should be a string`); }, number: (funcName: string, argName: string, v: any): number => { - if (!isNaN(v)) - { + if (!isNaN(v)) { if (typeof v === "number") return v; if (!isNaN(parseFloat(v))) return parseFloat(v); } @@ -700,8 +699,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { workerScript.log( "weaken", () => - `'${server.hostname}' security level weakened to ${ - server.hackDifficulty + `'${server.hostname}' security level weakened to ${server.hackDifficulty }. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)})`, ); workerScript.scriptRef.onlineExpGained += expGain; diff --git a/src/NetscriptFunctions/CodingContract.ts b/src/NetscriptFunctions/CodingContract.ts index 71fb95062..11dff9eed 100644 --- a/src/NetscriptFunctions/CodingContract.ts +++ b/src/NetscriptFunctions/CodingContract.ts @@ -53,23 +53,22 @@ export function NetscriptCodingContract( const serv = helper.getServer(hostname, "codingcontract.attempt"); if (contract.isSolution(answer)) { const reward = player.gainCodingContractReward(creward, contract.getDifficulty()); - workerScript.log("attempt", () => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`); + workerScript.log("codingcontract.attempt", () => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`); serv.removeContract(filename); return returnReward ? reward : true; } else { ++contract.tries; if (contract.tries >= contract.getMaxNumTries()) { workerScript.log( - "attempt", + "codingcontract.attempt", () => `Coding Contract attempt '${filename}' failed. Contract is now self-destructing`, ); serv.removeContract(filename); } else { workerScript.log( - "attempt", + "codingcontract.attempt", () => - `Coding Contract attempt '${filename}' failed. ${ - contract.getMaxNumTries() - contract.tries + `Coding Contract attempt '${filename}' failed. ${contract.getMaxNumTries() - contract.tries } attempts remaining.`, ); } diff --git a/src/NetscriptFunctions/Hacknet.ts b/src/NetscriptFunctions/Hacknet.ts index 4f0564f14..863250139 100644 --- a/src/NetscriptFunctions/Hacknet.ts +++ b/src/NetscriptFunctions/Hacknet.ts @@ -111,7 +111,7 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, he } const node = getHacknetNode(i, "upgradeCache"); if (!(node instanceof HacknetServer)) { - workerScript.log("upgradeCache", () => "Can only be called on hacknet servers"); + workerScript.log("hacknet.upgradeCache", () => "Can only be called on hacknet servers"); return false; } const res = purchaseCacheUpgrade(player, node, n); @@ -138,7 +138,7 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, he } const node = getHacknetNode(i, "upgradeCache"); if (!(node instanceof HacknetServer)) { - workerScript.log("getCacheUpgradeCost", () => "Can only be called on hacknet servers"); + workerScript.log("hacknet.getCacheUpgradeCost", () => "Can only be called on hacknet servers"); return -1; } return node.calculateCacheUpgradeCost(n);