Revert "Gang rework"

This commit is contained in:
danielyxie
2018-10-23 13:47:00 -05:00
committed by GitHub
parent 25bbccca88
commit be0a08d70c
41 changed files with 1690 additions and 171071 deletions
-15
View File
@@ -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);
}
}