Skip to content

Profectus / features/challenges/challenge / ChallengeOptions

Interface: ChallengeOptions ​

An object that configures a Challenge.

Extends ​

Properties ​

canStart? ​

optional canStart: MaybeRefOrGetter<boolean>

Whether this challenge can be started.

Defined in ​

profectus/src/features/challenges/challenge.tsx:33


classes? ​

optional classes: MaybeRefOrGetter<Record<string, boolean>>

Dictionary of CSS classes to apply to this feature.

Inherited from ​

VueFeatureOptions.classes

Defined in ​

profectus/src/util/vue.tsx:24


completionLimit? ​

optional completionLimit: MaybeRefOrGetter<DecimalSource>

The maximum number of times the challenge can be completed.

Defined in ​

profectus/src/features/challenges/challenge.tsx:39


display? ​

optional display: 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 ​

MaybeGetter<Renderable>

{ 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? ​

optional effectDisplay: MaybeGetter<Renderable> | undefined

A description of the current effect of this challenge.

goal? ​

optional goal: 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? ​

optional reward: MaybeGetter<Renderable> | undefined

A description of what will change upon completing this challenge.

title? ​

optional title: MaybeGetter<Renderable> | undefined

A header to appear at the top of the display.

Defined in ​

profectus/src/features/challenges/challenge.tsx:41


onComplete? ​

optional onComplete: VoidFunction

A function that is called when the challenge is completed.

Defined in ​

profectus/src/features/challenges/challenge.tsx:56


onEnter? ​

optional onEnter: VoidFunction

A function that is called when the challenge is entered.

Defined in ​

profectus/src/features/challenges/challenge.tsx:60


onExit? ​

optional onExit: VoidFunction

A function that is called when the challenge is exited.

Defined in ​

profectus/src/features/challenges/challenge.tsx:58


requirements ​

requirements: Requirements

The requirement(s) to complete this challenge.

Defined in ​

profectus/src/features/challenges/challenge.tsx:37


reset? ​

optional reset: Reset

The reset function for this challenge.

Defined in ​

profectus/src/features/challenges/challenge.tsx:35


style? ​

optional style: MaybeRefOrGetter<CSSProperties>

CSS to apply to this feature.

Inherited from ​

VueFeatureOptions.style

Defined in ​

profectus/src/util/vue.tsx:26


visibility? ​

optional visibility: MaybeRefOrGetter<boolean | Visibility>

Whether this feature should be visible.

Inherited from ​

VueFeatureOptions.visibility

Defined in ​

profectus/src/util/vue.tsx:22