2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
|
import{_ as e,c as t,o,N as a}from"./chunks/framework.0799945b.js";const m=JSON.parse('{"title":"Module: features/conversion","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/conversion.md","lastUpdated":null}'),r={name:"api/modules/features/conversion.md"},n=a('<h1 id="module-features-conversion" tabindex="-1">Module: features/conversion <a class="header-anchor" href="#module-features-conversion" aria-label="Permalink to "Module: features/conversion""></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to "Interfaces""></a></h2><h3 id="baseconversion" tabindex="-1">BaseConversion <a class="header-anchor" href="#baseconversion" aria-label="Permalink to "BaseConversion""></a></h3><p>• <strong>BaseConversion</strong>: <code>Object</code></p><p>The properties that are added onto a processed <a href="./conversion#conversionoptions">ConversionOptions</a> to create a <a href="./conversion#conversion">Conversion</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>convert</code></td><td style="text-align:left;"><code>VoidFunction</code></td><td style="text-align:left;">The function that performs the actual conversion.</td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L80" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:80</a></p><hr><h3 id="conversionoptions" tabindex="-1">ConversionOptions <a class="header-anchor" href="#conversionoptions" aria-label="Permalink to "ConversionOptions""></a></h3><p>• <strong>ConversionOptions</strong>: <code>Object</code></p><p>An object that configures a <a href="./conversion#conversion">Conversion</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>actualGain?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>></td><td style="text-align:left;">The absolute amount the output resource will be changed by. Typically this will be set for you in a conversion constructor. This will differ from <a href="./conversion#currentgain">currentGain</a> in the cases where the conversion isn't just adding the converted amount to the output resource.</td></tr><tr><td style="text-align:left;"><code>baseResource</code></td><td style="text-align:left;"><a href="./resource#resource"><code>Resource</code></a><<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>></td><td style="text-align:left;">The input <a href="./resource#resource">Resource</a> for this conversion.</td></tr><tr><td style="text-align:left;"><code>buyMax?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a><<code>boolean</code>></td><td style="text-align:left;">Whether or not to cap the amount of the output resource gained by converting at 1. Defaults to true.</td></tr><tr><td style="text-align:left;"><code>convert?</code></td><td style="text-align:left;"><code>VoidFunction</code></td><td style="text-align:left;">The function that performs the actual conversion from <a href="./conversion#baseresource">baseResource</a> to <a href="./conversion#gainresource">gainResource</a>. Typically this will be set for you in a conversion constructor.</td></tr><tr><td style="text-align:left;"><code>currentAt?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&l
|