profectus-docs/assets/api_modules_features_conversion.md.970ccc3a.js

1 line
26 KiB
JavaScript
Raw 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 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 &quot;Module: features/conversion&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="baseconversion" tabindex="-1">BaseConversion <a class="header-anchor" href="#baseconversion" aria-label="Permalink to &quot;BaseConversion&quot;"></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 &quot;Defined in&quot;"></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 &quot;ConversionOptions&quot;"></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>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</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&#39;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>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</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>&lt;<code>boolean</code>&gt;</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>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The amount of the input resource currently being required in order to produce the <a href="./conversion#currentgain">currentGain</a>. That is, if it went below this value then <a href="./conversion#currentgain">currentGain</a> would decrease. Typically this will be set for you in a conversion constructor.</td></tr><tr><td style="text-align:left;"><code>currentGain?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">How much of the output resource the conversion can currently convert for. Typically this will be set for you in a conversion constructor.</td></tr><tr><td style="text-align:left;"><code>formula</code></td><td style="text-align:left;">(<code>variable</code>: <a href="./../game/formulas/types#invertibleintegralformula"><code>InvertibleIntegralFormula</code></a>) =&gt; <a href="./../game/formulas/types#invertibleformula"><code>InvertibleFormula</code></a></td><td style="text-align:left;">The formula used to determine how much <a href="./conversion#gainresource">gainResource</a> should be earned by this converting. The passed value will be a Formula representing the <a href="./conversion#baseresource">baseResource</a> variable.</td></tr><tr><td style="text-align:left;"><code>gainResource</code></td><td style="text-align:left;"><a href="./resource#resource"><code>Resource</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The output <a href="./resource#resource">Resource</a> for this conversion. i.e. the resource being generated.</td></tr><tr><td style="text-align:left;"><code>nextAt?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;">The amount of the input resource required to make <a href="./conversion#currentgain">currentGain</a> increase. Typically this will be set for you in a conversion constructor.</td></tr><tr><td style="text-align:left;"><code>onConvert?</code></td><td style="text-align:left;">(<code>amountGained</code>: <a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>) =&gt; <code>void</code></td><td style="text-align:left;">A callback that happens after a conversion has been completed. Receives the amount gained via conversion. This will not be called whenever using currentGain without calling convert (e.g. passive generation)</td></tr><tr><td style="text-align:left;"><code>spend?</code></td><td style="text-align:left;">(<code>amountGained</code>: <a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>) =&gt; <code>void</code></td><td style="text-align:left;">The function that spends the <a href="./conversion#baseresource">baseResource</a> as part of the conversion. Defaults to setting the <a href="./conversion#baseresource">baseResource</a> amount to 0.</td></tr></tbody></table><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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L18" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:18</a></p><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to &quot;Type Aliases&quot;"></a></h2><h3 id="conversion" tabindex="-1">Conversion <a class="header-anchor" href="#conversion" aria-label="Permalink to &quot;Conversion&quot;"></a></h3><p>Ƭ <strong>Conversion</strong>&lt;<code>T</code>&gt;: <a href="./feature#replace"><code>Replace</code></a>&lt;<code>T</code> &amp; <a href="./conversion#baseconversion"><code>BaseConversion</code></a>, { <code>actualGain</code>: <a href="./../util/computed#getcomputabletypewithdefault"><code>GetComputableTypeWithDefault</code></a>&lt;<code>T</code>[<code>&quot;actualGain&quot;</code>], <code>Ref</code>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt;&gt; ; <code>buyMax</code>: <a href="./../util/computed#getcomputabletypewithdefault"><code>GetComputableTypeWithDefault</code></a>&lt;<code>T</code>[<code>&quot;buyMax&quot;</code>], <code>true</code>&gt; ; <code>currentAt</code>: <a href="./../util/computed#getcomputabletypewithdefault"><code>GetComputableTypeWithDefault</code></a>&lt;<code>T</code>[<code>&quot;currentAt&quot;</code>], <code>Ref</code>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt;&gt; ; <code>currentGain</code>: <a href="./../util/computed#getcomputabletypewithdefault"><code>GetComputableTypeWithDefault</code></a>&lt;<code>T</code>[<code>&quot;currentGain&quot;</code>], <code>Ref</code>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt;&gt; ; <code>formula</code>: <a href="./../game/formulas/types#invertibleformula"><code>InvertibleFormula</code></a> ; <code>nextAt</code>: <a href="./../util/computed#getcomputabletypewithdefault"><code>GetComputableTypeWithDefault</code></a>&lt;<code>T</code>[<code>&quot;nextAt&quot;</code>], <code>Ref</code>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt;&gt; ; <code>spend</code>: <code>undefined</code> extends <code>T</code>[<code>&quot;spend&quot;</code>] ? (<code>amountGained</code>: <a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>) =&gt; <code>void</code> : <code>T</code>[<code>&quot;spend&quot;</code>] }&gt;</p><p>An object that converts one <a href="./resource#resource">Resource</a> into another at a given rate.</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to &quot;Type parameters&quot;"></a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./conversion#conversionoptions"><code>ConversionOptions</code></a></td></tr></tbody></table><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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L88" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:88</a></p><hr><h3 id="genericconversion" tabindex="-1">GenericConversion <a class="header-anchor" href="#genericconversion" aria-label="Permalink to &quot;GenericConversion&quot;"></a></h3><p>Ƭ <strong>GenericConversion</strong>: <a href="./feature#replace"><code>Replace</code></a>&lt;<a href="./conversion#conversion"><code>Conversion</code></a>&lt;<a href="./conversion#conversionoptions"><code>ConversionOptions</code></a>&gt;, { <code>actualGain</code>: <a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt; ; <code>buyMax</code>: <a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<code>boolean</code>&gt; ; <code>currentAt</code>: <a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt; ; <code>currentGain</code>: <a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt; ; <code>nextAt</code>: <a href="./../util/computed#processedcomputable"><code>ProcessedComputable</code></a>&lt;<a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>&gt; ; <code>spend</code>: (<code>amountGained</code>: <a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a>) =&gt; <code>void</code> }&gt;</p><p>A type that matches any valid <a href="./conversion#conversion">Conversion</a> object.</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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L102" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:102</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;Functions&quot;"></a></h2><h3 id="createcanconvertrequirement" tabindex="-1">createCanConvertRequirement <a class="header-anchor" href="#createcanconvertrequirement" aria-label="Permalink to &quot;createCanConvertRequirement&quot;"></a></h3><p>▸ <strong>createCanConvertRequirement</strong>(<code>conversion</code>, <code>minGainAmount?</code>, <code>display?</code>): <a href="./../game/requirements#requirement"><code>Requirement</code></a></p><p>Creates requirement that is met when the conversion hits a specified gain amount</p><h5 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Default value</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>conversion</code></td><td style="text-align:left;"><a href="./conversion#genericconversion"><code>GenericConversion</code></a></td><td style="text-align:left;"><code>undefined</code></td><td style="text-align:left;">The conversion to check the gain amount of</td></tr><tr><td style="text-align:left;"><code>minGainAmount</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;"><code>1</code></td><td style="text-align:left;">The minimum gain amount that must be met for the requirement to be met</td></tr><tr><td style="text-align:left;"><code>display?</code></td><td style="text-align:left;"><a href="./feature#coercablecomponent"><code>CoercableComponent</code></a></td><td style="text-align:left;"><code>undefined</code></td><td style="text-align:left;">-</td></tr></tbody></table><h5 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./../game/requirements#requirement"><code>Requirement</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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L302" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:302</a></p><hr><h3 id="createconversion" tabindex="-1">createConversion <a class="header-anchor" href="#createconversion" aria-label="Permalink to &quot;createConversion&quot;"></a></h3><p>▸ <strong>createConversion</strong>&lt;<code>T</code>&gt;(<code>optionsFunc</code>, <code>...decorators</code>): <a href="./conversion#conversion"><code>Conversion</code></a>&lt;<code>T</code>&gt;</p><p>Lazily creates a conversion with the given options. You typically shouldn&#39;t use this function directly. Instead use one of the other conversion constructors, which will then call this.</p><p><strong><code>See</code></strong></p><ul><li><a href="./conversion#createcumulativeconversion">createCumulativeConversion</a>.</li><li><a href="./conversion#createindependentconversion">createIndependentConversion</a>.</li></ul><h5 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>T</code></td><td style="text-align:left;">extends <a href="./conversion#conversionoptions"><code>ConversionOptions</code></a></td></tr></tbody></table><h5 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><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>optionsFunc</code></td><td style="text-align:left;"><a href="./feature#optionsfunc"><code>OptionsFunc</code></a>&lt;<code>T</code>, <a href="./conversion#baseconversion"><code>BaseConversion</code></a>, <a href="./conversion#genericconversion"><code>GenericConversion</code></a>&gt;</td><td style="text-align:left;">Conversion options.</td></tr><tr><td style="text-align:left;"><code>...decorators</code></td><td style="text-align:left;"><a href="./decorators/common#genericdecorator"><code>GenericDecorator</code></a>[]</td><td style="text-align:left;">-</td></tr></tbody></table><h5 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./conversion#conversion"><code>Conversion</code></a>&lt;<code>T</code>&gt;</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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L121" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:121</a></p><hr><h3 id="createcumulativeconversion" tabindex="-1">createCumulativeConversion <a class="header-anchor" href="#createcumulativeconversion" aria-label="Permalink to &quot;createCumulativeConversion&quot;"></a></h3><p>▸ <strong>createCumulativeConversion</strong>&lt;<code>S</code>&gt;(<code>optionsFunc</code>): <a href="./conversion#conversion"><code>Conversion</code></a>&lt;<code>S</code>&gt;</p><p>Creates a conversion that simply adds to the gainResource amount upon converting. This is similar to the behavior of &quot;normal&quot; layers in The Modding Tree. This is equivalent to just calling createConversion directly.</p><h5 id="type-parameters-2" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-2" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>S</code></td><td style="text-align:left;">extends <a href="./conversion#conversionoptions"><code>ConversionOptions</code></a></td></tr></tbody></table><h5 id="parameters-2" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-2" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><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>optionsFunc</code></td><td style="text-align:left;"><a href="./feature#optionsfunc"><code>OptionsFunc</code></a>&lt;<code>S</code>, <a href="./conversion#baseconversion"><code>BaseConversion</code></a>, <a href="./conversion#genericconversion"><code>GenericConversion</code></a>&gt;</td><td style="text-align:left;">Conversion options.</td></tr></tbody></table><h5 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./conversion#conversion"><code>Conversion</code></a>&lt;<code>S</code>&gt;</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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L205" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:205</a></p><hr><h3 id="createindependentconversion" tabindex="-1">createIndependentConversion <a class="header-anchor" href="#createindependentconversion" aria-label="Permalink to &quot;createIndependentConversion&quot;"></a></h3><p>▸ <strong>createIndependentConversion</strong>&lt;<code>S</code>&gt;(<code>optionsFunc</code>): <a href="./conversion#conversion"><code>Conversion</code></a>&lt;<code>S</code>&gt;</p><p>Creates a conversion that will replace the gainResource amount with the new amount upon converting. This is similar to the behavior of &quot;static&quot; layers in The Modding Tree.</p><h5 id="type-parameters-3" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-3" aria-label="Permalink to &quot;Type parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>S</code></td><td style="text-align:left;">extends <a href="./conversion#conversionoptions"><code>ConversionOptions</code></a></td></tr></tbody></table><h5 id="parameters-3" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-3" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><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>optionsFunc</code></td><td style="text-align:left;"><a href="./feature#optionsfunc"><code>OptionsFunc</code></a>&lt;<code>S</code>, <a href="./conversion#baseconversion"><code>BaseConversion</code></a>, <a href="./conversion#genericconversion"><code>GenericConversion</code></a>&gt;</td><td style="text-align:left;">Converison options.</td></tr></tbody></table><h5 id="returns-3" tabindex="-1">Returns <a class="header-anchor" href="#returns-3" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><a href="./conversion#conversion"><code>Conversion</code></a>&lt;<code>S</code>&gt;</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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L216" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:216</a></p><hr><h3 id="setuppassivegeneration" tabindex="-1">setupPassiveGeneration <a class="header-anchor" href="#setuppassivegeneration" aria-label="Permalink to &quot;setupPassiveGeneration&quot;"></a></h3><p>▸ <strong>setupPassiveGeneration</strong>(<code>layer</code>, <code>conversion</code>, <code>rate?</code>, <code>cap?</code>): <code>void</code></p><p>This will automatically increase the value of conversion.gainResource without lowering the value of the input resource. It will by default perform 100% of a conversion&#39;s currentGain per second. If you use a ref for the rate you can set it&#39;s value to 0 when passive generation should be disabled.</p><h5 id="parameters-4" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-4" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Default value</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>layer</code></td><td style="text-align:left;"><a href="./../game/layers#baselayer"><code>BaseLayer</code></a></td><td style="text-align:left;"><code>undefined</code></td><td style="text-align:left;">The layer this passive generation will be associated with. Typically <code>this</code> when calling this function from inside a layer&#39;s options function.</td></tr><tr><td style="text-align:left;"><code>conversion</code></td><td style="text-align:left;"><a href="./conversion#genericconversion"><code>GenericConversion</code></a></td><td style="text-align:left;"><code>undefined</code></td><td style="text-align:left;">The conversion that will determine how much generation there is.</td></tr><tr><td style="text-align:left;"><code>rate</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;"><code>1</code></td><td style="text-align:left;">A multiplier to multiply against the conversion&#39;s currentGain.</td></tr><tr><td style="text-align:left;"><code>cap</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<a href="./../lib/break_eternity#decimalsource"><code>DecimalSource</code></a>&gt;</td><td style="text-align:left;"><code>Decimal.dInf</code></td><td style="text-align:left;">A value that should not be passed via passive generation.</td></tr></tbody></table><h5 id="returns-4" tabindex="-1">Returns <a class="header-anchor" href="#returns-4" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><code>void</code></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://github.com/profectus-engine/Profectus/blob/5c11524/src/features/conversion.ts#L276" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:276</a></p>',87),c=[n];function i(d,l,s,u,h,f){return o(),t("div",null,c)}const g=e(r,[["render",i]]);export{m as __pageData,g as default};