import{_ase,cast,oasa,a5ass}from"./chunks/framework.CK8QU5WH.js";consty=JSON.parse('{"title":"Layer Features","description":"","frontmatter":{},"headers":[],"relativePath":"public/lit/docs/layer-features.md","filePath":"public/lit/docs/layer-features.md"}'),i={name:"public/lit/docs/layer-features.md"},o=s(`<h1 id="layer-features" tabindex="-1">Layer Features <a class="header-anchor" href="#layer-features" aria-label="Permalink to "Layer Features""></a></h1><p>This is a more comprehensive list of established features to add to layers. You can add more freely, if you want to have other functions or values associated with your layer. These have special functionality, though.</p><p>You can make almost any value dynamic by using a function in its place, including all display strings and styling/color features.</p><h2 id="layer-definition-features" tabindex="-1">Layer Definition features <a class="header-anchor" href="#layer-definition-features" aria-label="Permalink to "Layer Definition features""></a></h2><ul><li><p>layer: <strong>assigned automagically</strong>. It's the same value as the name of this layer, so you can do <code>player[this.layer].points</code> or similar to access the saved value. It makes copying code to new layers easier. It is also assigned to all upgrades and buyables and such.</p></li><li><p>name: <strong>optional</strong>. used in reset confirmations (and the default infobox title). If absent, it just uses the layer's id.</p></li><li><p>startData(): A function to return the default save data for this layer. Add any variables you have to it. Make sure to use <code>Decimal</code> values rather than normal numbers.</p><p>Standard values: - Required: - unlocked: a bool determining if this layer is unlocked or not - points: a Decimal, the main currency for the layer - Optional: - total: A Decimal, tracks total amount of main prestige currency. Always tracked, but only shown if you add it here. - best: A Decimal, tracks highest amount of main prestige currency. Always tracked, but only shown if you add it here. - unlockOrder: used to keep track of relevant layers unlocked before this one. - resetTime: A number, time since this layer was last prestiged (or reset by another layer)</p></li><li><p>color: A color associated with this layer, used in many places. (A string in hex format with a #)</p></li><li><p>row: The row of the layer, starting at 0. This affects where the node appears on the standard tree, and which resets affect the layer.</p><p>Using "side" instead of a number will cause the layer to appear off to the side as a smaller node (useful for achievements and statistics). Side layers are not affected by resets unless you add a doReset to them.</p></li><li><p>displayRow: <strong>OVERRIDE</strong> Changes where the layer node appears without changing where it is in the reset order.</p></li><li><p>resource: Name of the main currency you gain by resetting on this layer.</p></li><li><p>effect(): <strong>optional</strong>. A function that calculates and returns the current values of any bonuses inherent to the main currency. Can return a value or an object containing multiple values. <em>You will also have to implement the effect where it is applied.</em></p></li><li><p>effectDescription: <strong>optional</strong>. A function that returns a description of this effect. If the text stays constant, it can just be a string.</p></li><li><p>layerShown(): <strong>optional</strong>, A function returning a bool which determines if this layer's node should be visible on the tree. It can also return "ghost", which will hide the layer, but its node will still take up space in the tree. Defaults to true.</p></li><li><p>hotkeys: <strong>optional</strong>. An array containing information on any hotkeys associated with this layer:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><s