Simplify API check

This commit is contained in:
nickofolas
2022-03-23 15:48:39 -05:00
parent 973ff5da7a
commit b437adb16c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import { INetscriptHelper } from "./INetscriptHelper";
export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGrafting {
const checkGraftingAPIAccess = (func: any): void => {
if (player.bitNodeN !== 10 && !SourceFileFlags[10]) {
if (!player.canAccessGrafting()) {
throw helper.makeRuntimeErrorMsg(
`grafting.${func}`,
"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10",