mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-11 04:42:34 +01:00
fix few bugs
This commit is contained in:
@ -467,6 +467,14 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
const argsToString = function (args: unknown[]): string {
|
const argsToString = function (args: unknown[]): string {
|
||||||
let out = "";
|
let out = "";
|
||||||
for (let arg of args) {
|
for (let arg of args) {
|
||||||
|
if (arg === null) {
|
||||||
|
out += "null";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (arg === undefined) {
|
||||||
|
out += "undefined";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
arg = toNative(arg);
|
arg = toNative(arg);
|
||||||
out += typeof arg === "object" ? JSON.stringify(arg) : `${arg}`;
|
out += typeof arg === "object" ? JSON.stringify(arg) : `${arg}`;
|
||||||
}
|
}
|
||||||
|
@ -18,4 +18,5 @@ export function finish(this: IPlayer, cancelled: boolean): void {
|
|||||||
if (this.currentWork === null) return;
|
if (this.currentWork === null) return;
|
||||||
this.currentWork.finish(this, cancelled);
|
this.currentWork.finish(this, cancelled);
|
||||||
this.currentWork = null;
|
this.currentWork = null;
|
||||||
|
this.focus = false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user