Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions components/candle/challengeHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export type ChallengeFilterOptions =
locationId: string
gameVersion: GameVersion
isFeatured?: boolean
isPeacockExclusive?: boolean
difficulty: number
pro1Filter: Pro1FilterType
}
Expand Down
45 changes: 45 additions & 0 deletions components/candle/challengeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ export abstract class ChallengeRegistry {
return gameGroups.get("GLOBAL_ESCALATION_CHALLENGES")?.get(groupId)
}

if (groupId?.includes("peacock")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worried this might conflict with Paris

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Challenge groups don't have any location-specific titles in there.

return gameGroups.get("GLOBAL_PEACOCK_CHALLENGES")?.get(groupId)
}

// Global merge groups are included by default. Filtered later.

const globalGroup = this.globalMergeGroups.get(groupId)
Expand Down Expand Up @@ -471,6 +475,10 @@ export abstract class ChallengeRegistry {
return gameChalGC.get("GLOBAL_ESCALATION_CHALLENGES")?.get(groupId)
}

if (groupId?.includes("peacock")) {
return gameChalGC.get("GLOBAL_PEACOCK_CHALLENGES")?.get(groupId)
}

// Global merge groups are included by default. Filtered later.

const globalGroup = this.globalMergeGroups.get(groupId)
Expand Down Expand Up @@ -780,6 +788,18 @@ export class ChallengeService extends ChallengeRegistry {
)
}

if (
filter.type === ChallengeFilterType.Contract &&
filter.isPeacockExclusive
) {
this.getGroupedChallengesByLoc(
filter,
"GLOBAL_PEACOCK_CHALLENGES",
challenges,
gameVersion,
)
}

this.getGroupedChallengesByLoc(
filter,
"GLOBAL_ARCADE_CHALLENGES",
Expand Down Expand Up @@ -880,6 +900,26 @@ export class ChallengeService extends ChallengeRegistry {

assert.ok(levelParentLocation)

const PeacockEscalations = [
"07bbf22b-d6ae-4883-bec2-122eeeb7b665",
"9e0188e8-bdad-476c-b4ce-2faa5d2be56c",
"74415eca-d01e-4070-9bc9-5ef9b4e8f7d2",
"0cceeecb-c8fe-42a4-aee4-d7b575f56a1b",
"115425b1-e797-47bf-b517-410dc7507397",
"e1e86206-d3f0-a819-e477-3d80e55e8a40",
"667f48a3-7f6b-486e-8f6b-2f782a5c4857",
"218302a3-f682-46f9-9ffd-bb3e82487b7c",
"9a461f89-86c5-44e4-998e-f2f66b496aa7",
"f19f7ac8-39ec-498b-aa23-44c8e75d8693",
"35f1f534-ae2d-42be-8472-dd55e96625ea",
"78628e05-93ce-4f87-8a17-b910d32df51f",
"ccdc7043-62af-44e8-a5fc-38b008c2044e",
"07ffa72a-bbac-45ca-8c9f-b9c1b526153a",
"1e4423b7-d4ff-448f-a8a8-4bb600cab7e3",
"edbacf4b-e402-4548-b723-cd4351571537",
"50fa5e99-0b51-45d4-9062-cd46dd928461",
]

return this.getGroupedChallengeLists(
{
type: ChallengeFilterType.Contract,
Expand All @@ -892,6 +932,11 @@ export class ChallengeService extends ChallengeRegistry {
: contract.Metadata.Location,
gameVersion,
isFeatured: contractGroup.Metadata.Type === "featured",
isPeacockExclusive:
PeacockEscalations.includes(contractGroup.Metadata.Id) ||
PeacockEscalations.includes(
String(contractGroup.Metadata?.InGroup),
),
pro1Filter:
contract.Metadata.Difficulty === "pro1"
? Pro1FilterType.Only
Expand Down
Loading