profectus-docs/assets/api_features_conversion_functions_setupPassiveGeneration.md.CMupRw7W.lean.js

1 line
3.6 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 a,c as r,a0 as t,o}from"./chunks/framework.P9qPzDnn.js";const h=JSON.parse('{"title":"Function: setupPassiveGeneration()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/features/conversion/functions/setupPassiveGeneration.md","filePath":"api/features/conversion/functions/setupPassiveGeneration.md","lastUpdated":null}'),n={name:"api/features/conversion/functions/setupPassiveGeneration.md"};function i(s,e,c,l,d,u){return o(),r("div",null,e[0]||(e[0]=[t('<p><a href="./../../../">Profectus</a> / <a href="./../">features/conversion</a> / setupPassiveGeneration</p><h1 id="function-setuppassivegeneration" tabindex="-1">Function: setupPassiveGeneration() <a class="header-anchor" href="#function-setuppassivegeneration" aria-label="Permalink to &quot;Function: setupPassiveGeneration()&quot;"></a></h1><blockquote><p><strong>setupPassiveGeneration</strong>(<code>layer</code>, <code>conversion</code>, <code>rate</code>, <code>cap</code>): <code>void</code></p></blockquote><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><h2 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h2><h3 id="layer" tabindex="-1">layer <a class="header-anchor" href="#layer" aria-label="Permalink to &quot;layer&quot;"></a></h3><p><a href="./../../../game/layers/interfaces/BaseLayer"><code>BaseLayer</code></a></p><p>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.</p><h3 id="conversion" tabindex="-1">conversion <a class="header-anchor" href="#conversion" aria-label="Permalink to &quot;conversion&quot;"></a></h3><p><a href="./../interfaces/Conversion"><code>Conversion</code></a></p><p>The conversion that will determine how much generation there is.</p><h3 id="rate" tabindex="-1">rate <a class="header-anchor" href="#rate" aria-label="Permalink to &quot;rate&quot;"></a></h3><p><a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a>&lt;<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt; = <code>1</code></p><p>A multiplier to multiply against the conversion&#39;s currentGain.</p><h3 id="cap" tabindex="-1">cap <a class="header-anchor" href="#cap" aria-label="Permalink to &quot;cap&quot;"></a></h3><p><a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a>&lt;<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt; = <code>Decimal.dInf</code></p><p>A value that should not be passed via passive generation.</p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h2><p><code>void</code></p><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h2><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/features/conversion.ts#L284" target="_blank" rel="noreferrer">profectus/src/features/conversion.ts:284</a></p>',21)]))}const f=a(n,[["render",i]]);export{h as __pageData,f as default};