profectus-docs/assets/api_modules_features_repeatable.md.e63148c4.js

2 lines
16 KiB
JavaScript
Raw Normal View History

import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Module: features/repeatable","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/repeatable.md","lastUpdated":null}'),l={name:"api/modules/features/repeatable.md"},r=o('<h1 id="module-features-repeatable" tabindex="-1">Module: features/repeatable <a class="header-anchor" href="#module-features-repeatable" aria-label="Permalink to &quot;Module: features/repeatable&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="baserepeatable" tabindex="-1">BaseRepeatable <a class="header-anchor" href="#baserepeatable" aria-label="Permalink to &quot;BaseRepeatable&quot;"></a></h3><p> <strong>BaseRepeatable</strong>: <code>Object</code></p><p>The properties that are added onto a processed <a href="./repeatable#repeatableoptions">RepeatableOptions</a> to create a <a href="./repeatable#repeatable">Repeatable</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>amount</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 amount this repeatable has.</td></tr><tr><td style="text-align:left;"><code>amountToIncrease</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;">How much amount can be increased by, or 1 if unclickable.</td></tr><tr><td style="text-align:left;"><code>canClick</code></td><td style="text-align:left;"><a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">Whether or not this repeatable can be clicked.</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 repeatable&#39;s amount is at it&#39;s limit.</td></tr><tr><td style="text-align:left;"><code>onClick</code></td><td style="text-align:left;">(<code>event?</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent" target="_blank" rel="noreferrer"><code>MouseEvent</code></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent" target="_blank" rel="noreferrer"><code>TouchEvent</code></a>) =&gt; <code>void</code></td><td style="text-align:left;">A function that gets called when this repeatable is clicked.</td></tr><tr><td style="text-align:left;"><code>type</code></td><td style="text-align:left;">typeof <a href="./repeatable#repeatabletype"><code>RepeatableType</code></a></td><td style="text-align:left;">A symbol that helps identify features of the same type.</td></tr></t