profectus-docs/assets/api_modules_game_persistence.md.8cf5b173.js

2 lines
19 KiB
JavaScript
Raw Normal View History

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 &quot;Module: game/persistence&quot;"></a></h1><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to &quot;Type Aliases&quot;"></a></h2><h3 id="nonpersistent" tabindex="-1">NonPersistent <a class="header-anchor" href="#nonpersistent" aria-label="Permalink to &quot;NonPersistent&quot;"></a></h3><p>Ƭ <strong>NonPersistent</strong>&lt;<code>T</code>&gt;: <code>WritableComputedRef</code>&lt;<code>T</code>&gt; &amp; { <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 &quot;Type parameters&quot;"></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 &quot;Defined in&quot;"></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 &quot;Persistent&quot;"></a></h3><p>Ƭ <strong>Persistent</strong>&lt;<code>T</code>&gt;: <code>Ref</code>&lt;<code>T</code>&gt; &amp; { <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>&lt;<code>T</code>&gt; ; <code>[PersistentState]</code>: <code>Ref</code>&lt;<code>T</code>&gt; ; <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 &quot;Type parameters&quot;"></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 &quot;Defined in&quot;"></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 &quot;State&quot;"></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