mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 22:38:34 +02:00
crash now prints ns stack trace, workerscript now does the shouldLog check on its own, many ns function are way simpler.
This commit is contained in:
@@ -188,7 +188,17 @@ export class WorkerScript {
|
||||
return (this.disableLogs.ALL == null && this.disableLogs[fn] == null);
|
||||
}
|
||||
|
||||
log(txt: string): void {
|
||||
log(func: string, txt: string): void {
|
||||
if(this.shouldLog(func)) {
|
||||
if(func !== "" && txt !== ""){
|
||||
this.scriptRef.log(`${func}: ${txt}`);
|
||||
} else {
|
||||
this.scriptRef.log(func+txt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print(txt: string): void {
|
||||
this.scriptRef.log(txt);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user