profectus-docs/assets/api_modules_game_player.md.ca5c5962.js

2 lines
11 KiB
JavaScript
Raw Normal View History

import{_ as e,c as t,o as a,N as l}from"./chunks/framework.0799945b.js";const p=JSON.parse('{"title":"Module: game/player","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/player.md","lastUpdated":null}'),d={name:"api/modules/game/player.md"},o=l('<h1 id="module-game-player" tabindex="-1">Module: game/player <a class="header-anchor" href="#module-game-player" aria-label="Permalink to &quot;Module: game/player&quot;"></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to &quot;Interfaces&quot;"></a></h2><h3 id="player" tabindex="-1">Player <a class="header-anchor" href="#player" aria-label="Permalink to &quot;Player&quot;"></a></h3><p> <strong>Player</strong>: <code>Object</code></p><p>The player save data object.</p><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>autosave</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to automatically save every couple of seconds and on tab close.</td></tr><tr><td style="text-align:left;"><code>devSpeed</code></td><td style="text-align:left;"><code>null</code> | <code>number</code></td><td style="text-align:left;">A multiplier for time passing. Set to 0 when the game is paused.</td></tr><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The ID of this save.</td></tr><tr><td style="text-align:left;"><code>keepGoing</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to continue playing after <a href="./../data/projEntry#haswon">hasWon</a> is true.</td></tr><tr><td style="text-align:left;"><code>layers</code></td><td style="text-align:left;"><a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <a href="./player#layerdata"><code>LayerData</code></a>&lt;<code>unknown</code>&gt;&gt;</td><td style="text-align:left;">A dictionary of layer save data.</td></tr><tr><td style="text-align:left;"><code>modID</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The ID of this project, to make sure saves aren&#39;t imported into the wrong project.</td></tr><tr><td style="text-align:left;"><code>modVersion</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The version of the project this save was created by. Used for upgrading saves for new versions.</td></tr><tr><td style="text-align:left;"><code>name</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The display name of this save.</td></tr><tr><td style="text-align:left;"><code>offlineProd</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to apply offline time when loading this save.</td></tr><tr><td style="text-align:left;"><code>offlineTime</code></td><td style="text-align:left;"><code>null</code> | <code>number</code></td><td style="text-align:left;">How much offline time has been accumulated and not yet processed.</td></tr><tr><td style="text-align:left;"><code>tabs</code></td><td style="text-align:left;"><code>string</code>[]</td><td style="text-align:left;">The open tabs.</td></tr><tr><td style="text-align:left;"><code>time</code></td><td style="text-align:left;"><code>number</code></td><td style="text-align:left;">The current time this save was last opened at, in ms since the unix epoch.</td></tr><tr><td style="text-align:left;"><code>timePlayed</code></td><td style="text-align:left;"><code>number</code></td><td style="text-align:left;">How long, in ms, this game has been played.</td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href