mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
simplify/dehardcode failOnHacknetServer
This commit is contained in:
@@ -686,9 +686,9 @@ function createPublicRunningScript(runningScript: RunningScript): IRunningScript
|
||||
* @param {string} callingFn - Name of calling function. For logging purposes
|
||||
* @returns {boolean} True if the server is a Hacknet Server, false otherwise
|
||||
*/
|
||||
function failOnHacknetServer(ctx: NetscriptContext, server: BaseServer, callingFn = ""): boolean {
|
||||
function failOnHacknetServer(ctx: NetscriptContext, server: BaseServer): boolean {
|
||||
if (server instanceof HacknetServer) {
|
||||
ctx.workerScript.log(callingFn, () => `Does not work on Hacknet Servers`);
|
||||
log(ctx, () => `Does not work on Hacknet Servers`);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user