2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
|
import{_ as e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Module: game/persistence","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/persistence.md","lastUpdated":null}'),s={name:"api/modules/game/persistence.md"},n=r('<h1 id="module-game-persistence" tabindex="-1">Module: game/persistence <a class="header-anchor" href="#module-game-persistence" aria-label="Permalink to "Module: game/persistence""></a></h1><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to "Type Aliases""></a></h2><h3 id="nonpersistent" tabindex="-1">NonPersistent <a class="header-anchor" href="#nonpersistent" aria-label="Permalink to "NonPersistent""></a></h3><p>Ƭ <strong>NonPersistent</strong><<code>T</code>>: <code>WritableComputedRef</code><<code>T</code>> & { <code>[DefaultValue]</code>: <code>T</code> }</p><h4 id="type-parameters" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type parameters""></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>T</code></td><td style="text-align:left;">extends <a href="./persistence#state"><code>State</code></a> = <a href="./persistence#state"><code>State</code></a></td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/src/game/persistence.ts#L37" target="_blank" rel="noreferrer">profectus/src/game/persistence.ts:37</a></p><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/src/game/persistence.ts#L92" target="_blank" rel="noreferrer">profectus/src/game/persistence.ts:92</a></p><hr><h3 id="persistent" tabindex="-1">Persistent <a class="header-anchor" href="#persistent" aria-label="Permalink to "Persistent""></a></h3><p>Ƭ <strong>Persistent</strong><<code>T</code>>: <code>Ref</code><<code>T</code>> & { <code>[CheckNaN]</code>: <code>boolean</code> ; <code>[DefaultValue]</code>: <code>T</code> ; <code>[Deleted]</code>: <code>boolean</code> ; <code>[NonPersistent]</code>: <a href="./persistence#nonpersistent-1"><code>NonPersistent</code></a><<code>T</code>> ; <code>[PersistentState]</code>: <code>Ref</code><<code>T</code>> ; <code>[SaveDataPath]</code>: <code>string</code>[] | <code>undefined</code> ; <code>[StackTrace]</code>: <code>string</code> ; <code>value</code>: <code>T</code> }</p><p>A Ref that has been augmented with properties to allow it to be saved and loaded within the player save data object.</p><h4 id="type-parameters-1" tabindex="-1">Type parameters <a class="header-anchor" href="#type-parameters-1" aria-label="Permalink to "Type parameters""></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>T</code></td><td style="text-align:left;">extends <a href="./persistence#state"><code>State</code></a> = <a href="./persistence#state"><code>State</code></a></td></tr></tbody></table><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/70cda5f/src/game/persistence.ts#L65" target="_blank" rel="noreferrer">profectus/src/game/persistence.ts:65</a></p><hr><h3 id="state" tabindex="-1">State <a class="header-anchor" href="#state" aria-label="Permalink to "State""></a></h3><p>Ƭ <strong>State</strong>: <code>string</code> | <code>number</code> | <code>boolean</code> | <a href="./../util/bignum#decimalsource"><code>DecimalSource</code></a> | { <code>[key: string]</code>: <a href="./persi
|