1 line
4 KiB
JavaScript
1 line
4 KiB
JavaScript
import{_ as e,c as a,o as t,a as r}from"./app.ab34650d.js";const y=JSON.parse('{"title":"Module: data/projEntry","description":"","frontmatter":{"editLink":false},"headers":[{"level":2,"title":"Variables","slug":"variables"},{"level":3,"title":"hasWon","slug":"haswon"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"fixOldSave","slug":"fixoldsave"},{"level":3,"title":"getInitialLayers","slug":"getinitiallayers"}],"relativePath":"api/modules/data/projEntry.md","lastUpdated":null}'),d={name:"api/modules/data/projEntry.md"},l=r('<h1 id="module-data-projentry" tabindex="-1">Module: data/projEntry <a class="header-anchor" href="#module-data-projentry" aria-hidden="true">#</a></h1><h2 id="variables" tabindex="-1">Variables <a class="header-anchor" href="#variables" aria-hidden="true">#</a></h2><h3 id="haswon" tabindex="-1">hasWon <a class="header-anchor" href="#haswon" aria-hidden="true">#</a></h3><p>\u2022 <code>Const</code> <strong>hasWon</strong>: <code>ComputedRef</code><<code>boolean</code>></p><p>A computed ref whose value is true whenever the game is over.</p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-hidden="true">#</a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/013092f/src/data/projEntry.tsx#L88" target="_blank" rel="noopener noreferrer">profectus/src/data/projEntry.tsx:88</a></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-hidden="true">#</a></h2><h3 id="fixoldsave" tabindex="-1">fixOldSave <a class="header-anchor" href="#fixoldsave" aria-hidden="true">#</a></h3><p>\u25B8 <strong>fixOldSave</strong>(<code>oldVersion</code>, <code>player</code>): <code>void</code></p><p>Given a player save data object being loaded with a different version, update the save data object to match the structure of the current version.</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-hidden="true">#</a></h4><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>oldVersion</code></td><td style="text-align:left;"><code>undefined</code> | <code>string</code></td><td style="text-align:left;">The version of the save being loaded in</td></tr><tr><td style="text-align:left;"><code>player</code></td><td style="text-align:left;"><code>Partial</code><<a href="../../interfaces/game/player.PlayerData"><code>PlayerData</code></a>></td><td style="text-align:left;">The save data being loaded in</td></tr></tbody></table><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-hidden="true">#</a></h4><p><code>void</code></p><hr><h3 id="getinitiallayers" tabindex="-1">getInitialLayers <a class="header-anchor" href="#getinitiallayers" aria-hidden="true">#</a></h3><p>\u25B8 <strong>getInitialLayers</strong>(<code>player</code>): <a href="./../game/layers.html#genericlayer"><code>GenericLayer</code></a>[]</p><p>Given a player save data object being loaded, return a list of layers that should currently be enabled. If your project does not use dynamic layers, this should just return all layers.</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-hidden="true">#</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>player</code></td><td style="text-align:left;"><code>Partial</code><<a href="../../interfaces/game/player.PlayerData"><code>PlayerData</code></a>></td></tr></tbody></table><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-hidden="true">#</a></h4><p><a href="./../game/layers.html#genericlayer"><code>GenericLayer</code></a>[]</p>',23),n=[l];function i(o,s,h,c,f,p){return t(),a("div",null,n)}var g=e(d,[["render",i]]);export{y as __pageData,g as default};
|