mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 02:32:55 +02:00
Revert "Gang rework"
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
import {Player} from "./Player";
|
||||
import {Gang} from "./Gang";
|
||||
import {makeRuntimeRejectMsg} from "./NetscriptEvaluator";
|
||||
|
||||
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