mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +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 {
|
||||
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",
|
||||
|
@ -167,8 +167,8 @@ SourceFiles["SourceFile10"] = new SourceFile(
|
||||
10,
|
||||
(
|
||||
<>
|
||||
This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a
|
||||
Duplicate Sleeve
|
||||
This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes.
|
||||
Each level of this Source-File also grants you a Duplicate Sleeve
|
||||
</>
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user