Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/candle/challengeHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions components/candle/challengeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
6 changes: 6 additions & 0 deletions components/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down