import{_ase,cast,oasr,Nasa}from"./chunks/framework.0799945b.js";constb=JSON.parse('{"title":"Module: features/resources/resource","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/resource.md","lastUpdated":null}'),o={name:"api/modules/features/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="interfaces"tabindex="-1">Interfaces<aclass="header-anchor"href="#interfaces"aria-label="Permalinkto"Interfaces""></a></h2><h3id="resource"tabindex="-1">Resource<aclass="header-anchor"href="#resource"aria-label="Permalinkto"Resource""></a></h3><p>•<strong>Resource</strong><<code>T</code>>:<code>Object</code></p><p>Anobjectthatrepresentsanamedandquantifiableresourceinthegame.</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;"><ahref="./../util/bignum#decimalsource"><code>DecimalSource</code></a></td></tr></tbody></table><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>[RefSymbol]</code></td><tdstyle="text-align:left;"><code>true</code></td><tdstyle="text-align:left;">Typedifferentiatoronly.Weneedthistobeinpublicd.tsbutdon'twantittoshowupinIDEautocomplete,soweuseaprivateSymbolinstead.</td></tr><tr><tdstyle="text-align:left;"><code>displayName</code></td><tdstyle="text-align:left;"><code>string</code></td><tdstyle="text-align:left;">Thenameofthisresource.</td></tr><tr><tdstyle="text-align:left;"><code>precision</code></td><tdstyle="text-align:left;"><code>number</code></td><tdstyle="text-align:left;">Whendisplayingthevalueofthisresource,howmanysignificantdigitstodisplay.</td></tr><tr><tdstyle="text-align:left;"><code>small?</code></td><tdstyle="text-align:left;"><code>boolean</code></td><tdstyle="text-align:left;">Whetherornottodisplayverysmallvaluesusingscientificnotation,orroundingto0.</td></tr><tr><tdstyle="text-align:left;"><code>value</code></td><tdstyle="text-align:left;"><code>T</code></td><tdstyle="text-align:left;">-</td></tr></tbody></table><h4id="defined-in"tabindex="-1">Definedin<aclass="header-anchor"href="#defined-in"aria-label="Permalinkto"Definedin""></a></h4><p><ahref="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/resources/resource.ts#L12"target="_blank"rel="noreferrer">profectus/src/features/resources/resource.ts:12</a></p><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="./resource#resource"><code>Resource</code></a><<code>T</code>>&<ahref="./../game/persistence#persistent"><code>Persistent</code></a><<code>T</code>>&{<code>[NonPersistent]</code>:<ahref="./resource#resource"><code>Resource</code></a><<code>T</code>>}</p><p>Createsaresource.</p><h5id="type-parameters-1"tabindex="-1">Typeparameters<aclass="header-anchor"href="#type-parameters-1"aria-label="Permalinkto"Typeparameters""></a></h5><table><thead><tr>