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

@ -12,7 +12,7 @@ import { INetscriptHelper } from "./INetscriptHelper";
export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGrafting { export function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGrafting {
const checkGraftingAPIAccess = (func: any): void => { const checkGraftingAPIAccess = (func: any): void => {
if (player.bitNodeN !== 10 && !SourceFileFlags[10]) { if (!player.canAccessGrafting()) {
throw helper.makeRuntimeErrorMsg( throw helper.makeRuntimeErrorMsg(
`grafting.${func}`, `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", "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",

@ -167,8 +167,8 @@ SourceFiles["SourceFile10"] = new SourceFile(
10, 10,
( (
<> <>
This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes.
Duplicate Sleeve Each level of this Source-File also grants you a Duplicate Sleeve
</> </>
), ),
); );