Skip to content

Commit 7d2ebde

Browse files
feat: Send current state in GetActiveChallengesAndProgression
1 parent 8da9cfa commit 7d2ebde

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/candle/challengeService.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,13 @@ export class ChallengeService extends ChallengeRegistry {
674674
(<ChallengeDefinitionLike>challenge?.Definition)?.Context || {},
675675
}
676676

677+
if (data[challengeId].CurrentState !== "Start") {
678+
// this is how the game reads the current state
679+
data[challengeId].State.CurrentState =
680+
data[challengeId].CurrentState
681+
// TODO: also add $StateEntryTime here
682+
}
683+
677684
const dependencies = this.getDependenciesForChallenge(
678685
challengeId,
679686
gameVersion,

0 commit comments

Comments
 (0)