1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-02-16 16:34:28 +01:00
This commit is contained in:
Pavel Alexandrov 2024-05-11 17:09:52 +03:00 committed by Reece Dunham
parent 4b7d984078
commit 50ceb295d5
2 changed files with 13 additions and 2 deletions

View File

@ -194,6 +194,7 @@ export abstract class ChallengeRegistry {
): void {
const gameChallenges = this.groupContents[gameVersion]
challenge.inGroup = groupId
challenge.inLocation = location
this.challenges[gameVersion].set(challenge.Id, challenge)
if (!gameChallenges.has(location)) {
@ -244,7 +245,7 @@ export abstract class ChallengeRegistry {
return (
this.challenges[gameVersion].delete(challengeId) &&
this.groupContents[gameVersion]
.get(challenge.ParentLocationId)!
.get(challenge.inLocation!)!
.get(challenge.inGroup!)!
.delete(challengeId)
)
@ -1243,7 +1244,7 @@ export class ChallengeService extends ChallengeRegistry {
const groupData = this.getGroupByIdLoc(
groupId,
challenges[0].ParentLocationId,
challenges[0].inLocation!,
gameVersion,
)

View File

@ -1378,9 +1378,19 @@ export interface RegistryChallenge extends SavedChallenge {
/**
* Warning: this property is INTERNAL and should NOT BE SPECIFIED by API users.
*
* The parent challenge group this challenge belongs to.
*
* @internal
*/
inGroup?: string
/**
* Warning: this property is INTERNAL and should NOT BE SPECIFIED by API users.
*
* The location ID this challenge belongs to, may mismatch ParentLocationId field.
*
* @internal
*/
inLocation?: string
}
/**