mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 04:47:03 +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:
@@ -6,10 +6,3 @@ export function unknownGangApiExceptionMessage(functionName, err) {
|
||||
return `gang.${functionName}() failed with exception: ` + err;
|
||||
}
|
||||
|
||||
export function checkGangApiAccess(workerScript, functionName) {
|
||||
const accessDenied = `gang.${functionName}() failed because you do not currently have a Gang`;
|
||||
const hasAccess = Player.gang instanceof Gang;
|
||||
if (!hasAccess) {
|
||||
throw makeRuntimeRejectMsg(workerScript, accessDenied);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user