profectus-docs/assets/api_modules_features_challenge.md.8e28d76a.js

2 lines
26 KiB
JavaScript
Raw Normal View History

import{_ as e,c as t,o as l,N as a}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Module: features/challenges/challenge","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/challenge.md","lastUpdated":null}'),o={name:"api/modules/features/challenge.md"},d=a('<h1 id="module-features-challenges-challenge" tabindex="-1">Module: features/challenges/challenge <a class="header-anchor" href="#module-features-challenges-challenge" aria-label="Permalink to &quot;Module: features/challenges/challenge&quot;"></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to &quot;Interfaces&quot;"></a></h2><h3 id="basechallenge" tabindex="-1">BaseChallenge <a class="header-anchor" href="#basechallenge" aria-label="Permalink to &quot;BaseChallenge&quot;"></a></h3><p> <strong>BaseChallenge</strong>: <code>Object</code></p><p>The properties that are added onto a processed <a href="./challenge#challengeoptions">ChallengeOptions</a> to create a <a href="./challenge#challenge">Challenge</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>[Component]</code></td><td style="text-align:left;"><a href="./feature#genericcomponent"><code>GenericComponent</code></a></td><td style="text-align:left;">The Vue component used to render this feature.</td></tr><tr><td style="text-align:left;"><code>[GatherProps]</code></td><td style="text-align:left;">() =&gt; <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>unknown</code>&gt;</td><td style="text-align:left;">A function to gather the props the vue component requires for this feature.</td></tr><tr><td style="text-align:left;"><code>active</code></td><td style="text-align:left;"><a href="./../game/persistence#persistent"><code>Persistent</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">Whether or not this challenge is currently active.</td></tr><tr><td style="text-align:left;"><code>canComplete</code></td><td style="text-align:left;"><code>Ref</code>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The current amount of times this challenge can be completed.</td></tr><tr><td style="text-align:left;"><code>complete</code></td><td style="text-align:left;">(<code>remainInChallenge?</code>: <code>boolean</code>) =&gt; <code>void</code></td><td style="text-align:left;">A function to complete this challenge.</td></tr><tr><td style="text-align:left;"><code>completed</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">Whether or not this challenge has been completed.</td></tr><tr><td style="text-align:left;"><code>completions</code></td><td style="text-align:left;"><a href="./../game/persistence#persistent"><code>Persistent</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The current number of times this challenge has been completed.</td></tr><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.</td></tr><tr><td style="text-align:left;"><code>maxed</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">Whether or not this challenge&#39;s completion count is at its limit.</td></tr><tr><td style="text-align:left;"><code>toggle</code></td><td style="text-align:left;"><code>VoidFunction</code></td><td style="text-align:left;">A function to enter or leave the challenge.</td></tr><tr><td style="text-align:left;"><co