mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge pull request #1758 from BartKoppelmans/patch-4
Fixed tprintf also printing the file name
This commit is contained in:
commit
7b3369223d
@ -696,22 +696,22 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
const str = vsprintf(format, args);
|
const str = vsprintf(format, args);
|
||||||
|
|
||||||
if (str.startsWith("ERROR") || str.startsWith("FAIL")) {
|
if (str.startsWith("ERROR") || str.startsWith("FAIL")) {
|
||||||
Terminal.error(`${workerScript.scriptRef.filename}: ${str}`);
|
Terminal.error(`${str}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (str.startsWith("SUCCESS")) {
|
if (str.startsWith("SUCCESS")) {
|
||||||
Terminal.success(`${workerScript.scriptRef.filename}: ${str}`);
|
Terminal.success(`${str}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (str.startsWith("WARN")) {
|
if (str.startsWith("WARN")) {
|
||||||
Terminal.warn(`${workerScript.scriptRef.filename}: ${str}`);
|
Terminal.warn(`${str}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (str.startsWith("INFO")) {
|
if (str.startsWith("INFO")) {
|
||||||
Terminal.info(`${workerScript.scriptRef.filename}: ${str}`);
|
Terminal.info(`${str}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Terminal.print(`${workerScript.scriptRef.filename}: ${str}`);
|
Terminal.print(`${str}`);
|
||||||
},
|
},
|
||||||
clearLog: function (): any {
|
clearLog: function (): any {
|
||||||
workerScript.scriptRef.clearLog();
|
workerScript.scriptRef.clearLog();
|
||||||
|
Loading…
Reference in New Issue
Block a user