profectus-docs/assets/api_features_challenges_challenge_interfaces_Challenge.md.BS7Xc5zx.js

1 line
21 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as a,c as r,a0 as t,o as n}from"./chunks/framework.P9qPzDnn.js";const f=JSON.parse('{"title":"Interface: Challenge","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/features/challenges/challenge/interfaces/Challenge.md","filePath":"api/features/challenges/challenge/interfaces/Challenge.md","lastUpdated":null}'),o={name:"api/features/challenges/challenge/interfaces/Challenge.md"};function i(l,e,c,s,h,d){return n(),r("div",null,e[0]||(e[0]=[t('<p><a href="./../../../../">Profectus</a> / <a href="./../">features/challenges/challenge</a> / Challenge</p><h1 id="interface-challenge" tabindex="-1">Interface: Challenge <a class="header-anchor" href="#interface-challenge" aria-label="Permalink to &quot;Interface: Challenge&quot;"></a></h1><p>An object that represents a feature that can be entered and exited, and have one or more completions with scaling requirements.</p><h2 id="extends" tabindex="-1">Extends <a class="header-anchor" href="#extends" aria-label="Permalink to &quot;Extends&quot;"></a></h2><ul><li><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a></li></ul><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;"></a></h2><h3 id="vuefeature" tabindex="-1">[VueFeature] <a class="header-anchor" href="#vuefeature" aria-label="Permalink to &quot;\\[VueFeature\\]&quot;"></a></h3><blockquote><p><strong>[VueFeature]</strong>: <code>true</code></p></blockquote><p>Used to identify Vue Features</p><h4 id="inherited-from" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#[vuefeature]"><code>[VueFeature]</code></a></p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L43" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:43</a></p><hr><h3 id="active" tabindex="-1">active <a class="header-anchor" href="#active" aria-label="Permalink to &quot;active&quot;"></a></h3><blockquote><p><strong>active</strong>: <a href="./../../../../game/persistence/type-aliases/Persistent"><code>Persistent</code></a>&lt;<code>boolean</code>&gt;</p></blockquote><p>Whether or not this challenge is currently active.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L90" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:90</a></p><hr><h3 id="cancomplete" tabindex="-1">canComplete <a class="header-anchor" href="#cancomplete" aria-label="Permalink to &quot;canComplete&quot;"></a></h3><blockquote><p><strong>canComplete</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<a href="./../../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>, <a href="./../../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt;</p></blockquote><p>The current amount of times this challenge can be completed.</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L82" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:82</a></p><hr><h3 id="canstart" tabindex="-1">canStart? <a class="header-anchor" href="#canstart" aria-label="Permalink to &quot;canStart?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>canStart</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<code>boolean</code>&gt;</p></blockquote><p>Whether this challenge can be started.</p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L76" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:76</a></p><hr><h3 id="classes" tabindex="-1">classes? <a class="header-anchor" href="#classes" aria-label="Permalink to &quot;classes?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>classes</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <code>boolean</code>&gt;&gt;</p></blockquote><p>Dictionary of CSS classes to apply to this feature.</p><h4 id="inherited-from-1" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-1" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#classes"><code>classes</code></a></p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L35" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:35</a></p><hr><h3 id="complete" tabindex="-1">complete() <a class="header-anchor" href="#complete" aria-label="Permalink to &quot;complete()&quot;"></a></h3><blockquote><p><strong>complete</strong>: (<code>remainInChallenge</code>?) =&gt; <code>void</code></p></blockquote><p>A function to complete this challenge.</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><h5 id="remaininchallenge" tabindex="-1">remainInChallenge? <a class="header-anchor" href="#remaininchallenge" aria-label="Permalink to &quot;remainInChallenge?&quot;"></a></h5><p><code>boolean</code></p><p>Optional parameter to specify if the challenge should remain active after completion.</p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>void</code></p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L97" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:97</a></p><hr><h3 id="completed" tabindex="-1">completed <a class="header-anchor" href="#completed" aria-label="Permalink to &quot;completed&quot;"></a></h3><blockquote><p><strong>completed</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<code>boolean</code>, <code>boolean</code>&gt;</p></blockquote><p>Whether or not this challenge has been completed.</p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L86" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:86</a></p><hr><h3 id="completionlimit" tabindex="-1">completionLimit? <a class="header-anchor" href="#completionlimit" aria-label="Permalink to &quot;completionLimit?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>completionLimit</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<a href="./../../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt;</p></blockquote><p>The maximum number of times the challenge can be completed.</p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L78" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:78</a></p><hr><h3 id="completions" tabindex="-1">completions <a class="header-anchor" href="#completions" aria-label="Permalink to &quot;completions&quot;"></a></h3><blockquote><p><strong>completions</strong>: <a href="./../../../../game/persistence/type-aliases/Persistent"><code>Persistent</code></a>&lt;<a href="./../../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt;</p></blockquote><p>The current number of times this challenge has been completed.</p><h4 id="defined-in-8" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-8" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L84" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:84</a></p><hr><h3 id="components" tabindex="-1">components <a class="header-anchor" href="#components" aria-label="Permalink to &quot;components&quot;"></a></h3><blockquote><p><strong>components</strong>: <a href="./../../../../util/computed/type-aliases/MaybeGetter"><code>MaybeGetter</code></a>&lt;<a href="./../../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a>&gt;[]</p></blockquote><p>The components to render inside the vue feature</p><h4 id="inherited-from-2" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-2" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#components"><code>components</code></a></p><h4 id="defined-in-9" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-9" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L39" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:39</a></p><hr><h3 id="display" tabindex="-1">display? <a class="header-anchor" href="#display" aria-label="Permalink to &quot;display?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>display</strong>: <a href="./../../../../util/computed/type-aliases/MaybeGetter"><code>MaybeGetter</code></a>&lt;<a href="./../../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a>&gt;</p></blockquote><p>The display to use for this challenge.</p><h4 id="defined-in-10" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-10" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L80" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:80</a></p><hr><h3 id="id" tabindex="-1">id <a class="header-anchor" href="#id" aria-label="Permalink to &quot;id&quot;"></a></h3><blockquote><p><strong>id</strong>: <code>string</code></p></blockquote><p>An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.</p><h4 id="inherited-from-3" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-3" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#id"><code>id</code></a></p><h4 id="defined-in-11" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-11" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L31" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:31</a></p><hr><h3 id="maxed" tabindex="-1">maxed <a class="header-anchor" href="#maxed" aria-label="Permalink to &quot;maxed&quot;"></a></h3><blockquote><p><strong>maxed</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<code>boolean</code>, <code>boolean</code>&gt;</p></blockquote><p>Whether or not this challenge&#39;s completion count is at its limit.</p><h4 id="defined-in-12" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-12" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L88" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:88</a></p><hr><h3 id="oncomplete" tabindex="-1">onComplete? <a class="header-anchor" href="#oncomplete" aria-label="Permalink to &quot;onComplete?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>onComplete</strong>: <code>VoidFunction</code></p></blockquote><p>A function that is called when the challenge is completed.</p><h4 id="defined-in-13" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-13" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L70" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:70</a></p><hr><h3 id="onenter" tabindex="-1">onEnter? <a class="header-anchor" href="#onenter" aria-label="Permalink to &quot;onEnter?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>onEnter</strong>: <code>VoidFunction</code></p></blockquote><p>A function that is called when the challenge is entered.</p><h4 id="defined-in-14" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-14" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L74" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:74</a></p><hr><h3 id="onexit" tabindex="-1">onExit? <a class="header-anchor" href="#onexit" aria-label="Permalink to &quot;onExit?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>onExit</strong>: <code>VoidFunction</code></p></blockquote><p>A function that is called when the challenge is exited.</p><h4 id="defined-in-15" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-15" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L72" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:72</a></p><hr><h3 id="requirements" tabindex="-1">requirements <a class="header-anchor" href="#requirements" aria-label="Permalink to &quot;requirements&quot;"></a></h3><blockquote><p><strong>requirements</strong>: <a href="./../../../../game/requirements/type-aliases/Requirements"><code>Requirements</code></a></p></blockquote><p>The requirement(s) to complete this challenge.</p><h4 id="defined-in-16" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-16" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L68" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:68</a></p><hr><h3 id="reset" tabindex="-1">reset? <a class="header-anchor" href="#reset" aria-label="Permalink to &quot;reset?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>reset</strong>: <a href="./../../../reset/interfaces/Reset"><code>Reset</code></a></p></blockquote><p>The reset function for this challenge.</p><h4 id="defined-in-17" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-17" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L66" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:66</a></p><hr><h3 id="style" tabindex="-1">style? <a class="header-anchor" href="#style" aria-label="Permalink to &quot;style?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>style</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<a href="https://vuejs.org/api/utility-types.html#cssproperties" target="_blank" rel="noreferrer"><code>CSSProperties</code></a>&gt;</p></blockquote><p>CSS to apply to this feature.</p><h4 id="inherited-from-4" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-4" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#style"><code>style</code></a></p><h4 id="defined-in-18" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-18" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L37" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:37</a></p><hr><h3 id="toggle" tabindex="-1">toggle <a class="header-anchor" href="#toggle" aria-label="Permalink to &quot;toggle&quot;"></a></h3><blockquote><p><strong>toggle</strong>: <code>VoidFunction</code></p></blockquote><p>A function to enter or leave the challenge.</p><h4 id="defined-in-19" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-19" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L92" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:92</a></p><hr><h3 id="type" tabindex="-1">type <a class="header-anchor" href="#type" aria-label="Permalink to &quot;type&quot;"></a></h3><blockquote><p><strong>type</strong>: <em>typeof</em> <a href="./../variables/ChallengeType"><code>ChallengeType</code></a></p></blockquote><p>A symbol that helps identify features of the same type.</p><h4 id="defined-in-20" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-20" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/challenges/challenge.tsx#L99" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:99</a></p><hr><h3 id="visibility" tabindex="-1">visibility? <a class="header-anchor" href="#visibility" aria-label="Permalink to &quot;visibility?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>visibility</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;boolean | Visibility&gt;</p></blockquote><p>Whether this feature should be visible.</p><h4 id="inherited-from-5" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-5" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#visibility"><code>visibility</code></a></p><h4 id="defined-in-21" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-21" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L33" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:33</a></p><hr><h3 id="wrappers" tabindex="-1">wrappers <a class="header-anchor" href="#wrappers" aria-label="Permalink to &quot;wrappers&quot;"></a></h3><blockquote><p><strong>wrappers</strong>: <a href="./../../../../util/vue/type-aliases/Wrapper"><code>Wrapper</code></a>[]</p></blockquote><p>The components to render wrapped around the vue feature</p><h4 id="inherited-from-6" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-6" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./../../../../util/vue/interfaces/VueFeature"><code>VueFeature</code></a>.<a href="./../../../../util/vue/interfaces/VueFeature#wrappers"><code>wrappers</code></a></p><h4 id="defined-in-22" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-22" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/util/vue.tsx#L41" target="_blank" rel="noreferrer">profectus/src/util/vue.tsx:41</a></p>',163)]))}const p=a(o,[["render",i]]);export{f as __pageData,p as default};