Profectus / features/challenges/challenge / ChallengeOptions
Interface: ChallengeOptions ​
An object that configures a Challenge.
Extends ​
Properties ​
canStart? ​
optionalcanStart:MaybeRefOrGetter<boolean>
Whether this challenge can be started.
Defined in ​
profectus/src/features/challenges/challenge.tsx:110
classes? ​
optionalclasses:MaybeRefOrGetter<Record<string,boolean>>
Dictionary of CSS classes to apply to this feature.
Inherited from ​
Defined in ​
completionLimit? ​
optionalcompletionLimit:MaybeRefOrGetter<DecimalSource>
The maximum number of times the challenge can be completed.
Defined in ​
profectus/src/features/challenges/challenge.tsx:116
display? ​
optionaldisplay:MaybeGetter<Renderable> | {description:MaybeGetter<Renderable>;effectDisplay: MaybeGetter<Renderable> | undefined;goal: MaybeGetter<Renderable> | undefined;reward: MaybeGetter<Renderable> | undefined;title: MaybeGetter<Renderable> | undefined; }
The display to use for this challenge.
Type declaration ​
{ description: MaybeGetter<Renderable>; effectDisplay: MaybeGetter<Renderable> | undefined; goal: MaybeGetter<Renderable> | undefined; reward: MaybeGetter<Renderable> | undefined; title: MaybeGetter<Renderable> | undefined; }
description ​
description:
MaybeGetter<Renderable>
The main text that appears in the display.
effectDisplay? ​
optionaleffectDisplay: MaybeGetter<Renderable> | undefined
A description of the current effect of this challenge.
goal? ​
optionalgoal: MaybeGetter<Renderable> | undefined
A description of the current goal for this challenge. If unspecified then the requirements will be displayed automatically based on requirements.
reward? ​
optionalreward: MaybeGetter<Renderable> | undefined
A description of what will change upon completing this challenge.
title? ​
optionaltitle: MaybeGetter<Renderable> | undefined
A header to appear at the top of the display.
Defined in ​
profectus/src/features/challenges/challenge.tsx:118
onComplete? ​
optionalonComplete:VoidFunction
A function that is called when the challenge is completed.
Defined in ​
profectus/src/features/challenges/challenge.tsx:133
onEnter? ​
optionalonEnter:VoidFunction
A function that is called when the challenge is entered.
Defined in ​
profectus/src/features/challenges/challenge.tsx:137
onExit? ​
optionalonExit:VoidFunction
A function that is called when the challenge is exited.
Defined in ​
profectus/src/features/challenges/challenge.tsx:135
requirements ​
requirements:
Requirements
The requirement(s) to complete this challenge.
Defined in ​
profectus/src/features/challenges/challenge.tsx:114
reset? ​
optionalreset:Reset
The reset function for this challenge.
Defined in ​
profectus/src/features/challenges/challenge.tsx:112
style? ​
optionalstyle:MaybeRefOrGetter<CSSProperties>
CSS to apply to this feature.
Inherited from ​
Defined in ​
visibility? ​
optionalvisibility:MaybeRefOrGetter<boolean | Visibility>
Whether this feature should be visible.