import{_ase,cast,oasr,Nasa}from"./chunks/framework.0799945b.js";constm=JSON.parse('{"title":"Module: features/resources/resource","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/resources/resource.md","lastUpdated":null}'),o={name:"api/modules/features/resources/resource.md"},s=a('<h1id="module-features-resources-resource"tabindex="-1">Module:features/resources/resource<aclass="header-anchor"href="#module-features-resources-resource"aria-label="Permalink to "Module: features/resources/resource""></a></h1><h2id="components"tabindex="-1">Components<aclass="header-anchor"href="#components"aria-label="Permalinkto"Components""></a></h2><ul><li><ahref="./MainDisplayComponent">MainDisplay</a></li><li><ahref="./ResourceComponent">Resource</a></li></ul><h2id="interfaces"tabindex="-1">Interfaces<aclass="header-anchor"href="#interfaces"aria-label="Permalinkto"Interfaces""></a></h2><ul><li><ahref="../../../interfaces/features/resources/resource.Resource">Resource</a></li></ul><h2id="functions"tabindex="-1">Functions<aclass="header-anchor"href="#functions"aria-label="Permalinkto"Functions""></a></h2><h3id="createresource"tabindex="-1">createResource<aclass="header-anchor"href="#createresource"aria-label="Permalinkto"createResource""></a></h3><p>▸<strong>createResource</strong><<code>T</code>>(<code>defaultValue</code>,<code>displayName?</code>,<code>precision?</code>,<code>small?</code>):<ahref="../../../interfaces/features/resources/resource.Resource"><code>Resource</code></a><<code>T</code>>&<ahref="./../../game/persistence#persistent"><code>Persistent</code></a><<code>T</code>>&{<code>[NonPersistent]</code>:<ahref="../../../interfaces/features/resources/resource.Resource"><code>Resource</code></a><<code>T</code>>}</p><p>Createsaresource.</p><h4id="type-parameters"tabindex="-1">Typeparameters<aclass="header-anchor"href="#type-parameters"aria-label="Permalinkto"Typeparameters""></a></h4><table><thead><tr><thstyle="text-align:left;">Name</th><thstyle="text-align:left;">Type</th></tr></thead><tbody><tr><tdstyle="text-align:left;"><code>T</code></td><tdstyle="text-align:left;">extends<ahref="./../../game/persistence#state"><code>State</code></a></td></tr></tbody></table><h4id="parameters"tabindex="-1">Parameters<aclass="header-anchor"href="#parameters"aria-label="Permalinkto"Parameters""></a></h4><table><thead><tr><thstyle="text-align:left;">Name</th><thstyle="text-align:left;">Type</th><thstyle="text-align:left;">Description</th></tr></thead><tbody><tr><tdstyle="text-align:left;"><code>defaultValue</code></td><tdstyle="text-align:left;"><code>T</code></td><tdstyle="text-align:left;">Theinitialvalueoftheresource</td></tr><tr><tdstyle="text-align:left;"><code>displayName?</code></td><tdstyle="text-align:left;"><code>string</code></td><tdstyle="text-align:left;">Thehumanreadablenameofthisresource</td></tr><tr><tdstyle="text-align:left;"><code>precision?</code></td><tdstyle="text-align:left;"><code>number</code></td><tdstyle="text-align:left;">Thenumberofsignificantdigitstodisplaybydefault</td></tr><tr><tdstyle="text-align:left;"><code>small?</code></td><tdstyle="text-align:left;"><code>boolean</code></td><tdstyle="text-align:left;">Whetherornottodisplayverysmallvaluesorroundto0,bydefault</td></tr></tbody></table><h4id="returns"tabindex="-1">Returns<aclass="header-anchor"href="#returns"aria-label="Permalinkto"Returns""></a></h4><p><ahref="../../../interfaces/features/resources/resource.Resource"><code>Resource</code></a><<code>T</code>>&<ahref="./../../game/persistence#persistent"><code>Persistent</code></a><<code>T</code>>&{<code>[NonPersistent]</code>:<ahref="../../../interfaces/features/resources/resource.Resource"><code>Resource</code></a><<code>T</code>>}</p><h4id="