mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Simplify API check
This commit is contained in:
parent
973ff5da7a
commit
b437adb16c
@ -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
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user