diff --git a/components/candle/challengeHelpers.ts b/components/candle/challengeHelpers.ts index 6c89debe5..6f9469221 100644 --- a/components/candle/challengeHelpers.ts +++ b/components/candle/challengeHelpers.ts @@ -28,6 +28,7 @@ import { import { SavedChallengeGroup } from "../types/challenges" import { controller } from "../controller" import { gameDifficulty, isSniperLocation } from "../utils" +import { getFlag } from "../flags" /** * Change a registry challenge to the runtime format (for GetActiveChallenges). @@ -275,6 +276,10 @@ export function filterChallenge( options: ChallengeFilterOptions, challenge: RegistryChallenge, ): boolean { + if (challenge.Tags.includes("peacock") && !getFlag("exclusiveContent")) { + return false + } + switch (options.type) { case ChallengeFilterType.None: return true diff --git a/components/candle/challengeService.ts b/components/candle/challengeService.ts index 5a55a31c1..2332aef78 100644 --- a/components/candle/challengeService.ts +++ b/components/candle/challengeService.ts @@ -350,6 +350,10 @@ export abstract class ChallengeRegistry { return this.challenges[gameVersion].get(challengeId) } + /** + * Get all challenge IDs that are present on a specific game version. + * @param gameVersion The game version. + */ getChallengeIds(gameVersion: GameVersion): string[] { return Array.from(this.challenges[gameVersion].keys()) } diff --git a/components/flags.ts b/components/flags.ts index 5e1e043c9..8bbdeaf64 100644 --- a/components/flags.ts +++ b/components/flags.ts @@ -49,6 +49,12 @@ export const defaultFlags: Flags = { possibleValues: ["REVEALED", "CLOUDED", "KEEP"], default: "KEEP", }, + exclusiveContent: { + category: "Gameplay", + title: "exclusiveContent", + desc: "Enable or disable Peacock exclusive content (challenges, escalations, etc).", + default: true, + }, enableMasteryProgression: { category: "Gameplay", title: "enableMasteryProgression",