Skip to content

Profectus / features/challenges/challenge / Challenge

Interface: Challenge ​

An object that represents a feature that can be entered and exited, and have one or more completions with scaling requirements.

Extends ​

Properties ​

[VueFeature] ​

[VueFeature]: true

Used to identify Vue Features

Inherited from ​

VueFeature.[VueFeature]

Defined in ​

profectus/src/util/vue.tsx:43


active ​

active: Persistent<boolean>

Whether or not this challenge is currently active.

Defined in ​

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


canComplete ​

canComplete: Ref<DecimalSource, DecimalSource>

The current amount of times this challenge can be completed.

Defined in ​

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


canStart? ​

optional canStart: MaybeRef<boolean>

Whether this challenge can be started.

Defined in ​

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


classes? ​

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

Dictionary of CSS classes to apply to this feature.

Inherited from ​

VueFeature.classes

Defined in ​

profectus/src/util/vue.tsx:35


complete() ​

complete: (remainInChallenge?) => void

A function to complete this challenge.

Parameters ​

remainInChallenge? ​

boolean

Optional parameter to specify if the challenge should remain active after completion.

Returns ​

void

Defined in ​

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


completed ​

completed: Ref<boolean, boolean>

Whether or not this challenge has been completed.

Defined in ​

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


completionLimit? ​

optional completionLimit: MaybeRef<DecimalSource>

The maximum number of times the challenge can be completed.

Defined in ​

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


completions ​

completions: Persistent<DecimalSource>

The current number of times this challenge has been completed.

Defined in ​

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


components ​

components: MaybeGetter<Renderable>[]

The components to render inside the vue feature

Inherited from ​

VueFeature.components

Defined in ​

profectus/src/util/vue.tsx:39


display? ​

optional display: MaybeGetter<Renderable>

The display to use for this challenge.

Defined in ​

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


id ​

id: string

An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.

Inherited from ​

VueFeature.id

Defined in ​

profectus/src/util/vue.tsx:31


maxed ​

maxed: Ref<boolean, boolean>

Whether or not this challenge's completion count is at its limit.

Defined in ​

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


onComplete? ​

optional onComplete: VoidFunction

A function that is called when the challenge is completed.

Defined in ​

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


onEnter? ​

optional onEnter: VoidFunction

A function that is called when the challenge is entered.

Defined in ​

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


onExit? ​

optional onExit: VoidFunction

A function that is called when the challenge is exited.

Defined in ​

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


requirements ​

requirements: Requirements

The requirement(s) to complete this challenge.

Defined in ​

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


reset? ​

optional reset: Reset

The reset function for this challenge.

Defined in ​

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


style? ​

optional style: MaybeRef<CSSProperties>

CSS to apply to this feature.

Inherited from ​

VueFeature.style

Defined in ​

profectus/src/util/vue.tsx:37


toggle ​

toggle: VoidFunction

A function to enter or leave the challenge.

Defined in ​

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


type ​

type: typeof ChallengeType

A symbol that helps identify features of the same type.

Defined in ​

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


visibility? ​

optional visibility: MaybeRef<boolean | Visibility>

Whether this feature should be visible.

Inherited from ​

VueFeature.visibility

Defined in ​

profectus/src/util/vue.tsx:33


wrappers ​

wrappers: Wrapper[]

The components to render wrapped around the vue feature

Inherited from ​

VueFeature.wrappers

Defined in ​

profectus/src/util/vue.tsx:41