mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
workerscript log takes a function now, hopefully this will increase performance.
This commit is contained in:
@@ -25,7 +25,7 @@ export function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, hel
|
||||
const checkSleeveNumber = function (func: any, sleeveNumber: any): void {
|
||||
if (sleeveNumber >= player.sleeves.length || sleeveNumber < 0) {
|
||||
const msg = `Invalid sleeve number: ${sleeveNumber}`;
|
||||
workerScript.log(func, msg);
|
||||
workerScript.log(func, () => msg);
|
||||
throw helper.makeRuntimeErrorMsg(`sleeve.${func}`, msg);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user