profectus-docs/assets/api_modules_game_settings.md.9be4860a.js

2 lines
12 KiB
JavaScript
Raw Normal View History

import{_ as e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Module: game/settings","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/settings.md","lastUpdated":null}'),o={name:"api/modules/game/settings.md"},n=r('<h1 id="module-game-settings" tabindex="-1">Module: game/settings <a class="header-anchor" href="#module-game-settings" aria-label="Permalink to &quot;Module: game/settings&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="settings" tabindex="-1">Settings <a class="header-anchor" href="#settings" aria-label="Permalink to &quot;Settings&quot;"></a></h3><p> <strong>Settings</strong>: <code>Object</code></p><p>The player&#39;s settings 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>active</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The ID of the active save.</td></tr><tr><td style="text-align:left;"><code>alignUnits</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether to align modifiers to the unit.</td></tr><tr><td style="text-align:left;"><code>hideChallenges</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">-</td></tr><tr><td style="text-align:left;"><code>msDisplay</code></td><td style="text-align:left;"><a href="./../features/achievement#achievementdisplay"><code>AchievementDisplay</code></a></td><td style="text-align:left;">-</td></tr><tr><td style="text-align:left;"><code>saves</code></td><td style="text-align:left;"><code>string</code>[]</td><td style="text-align:left;">The IDs of all created saves.</td></tr><tr><td style="text-align:left;"><code>showTPS</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to show the current ticks per second in the lower left corner of the page.</td></tr><tr><td style="text-align:left;"><code>theme</code></td><td style="text-align:left;"><a href="./../data/themes#themes"><code>Themes</code></a></td><td style="text-align:left;">The current theme to display the game in.</td></tr><tr><td style="text-align:left;"><code>unthrottled</code></td><td style="text-align:left;"><code>boolean</code></td><td style="text-align:left;">Whether or not to cap the project at 20 ticks per second.</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/c386ace/src/game/settings.ts#L10" target="_blank" rel="noreferrer">profectus/src/game/settings.ts:10</a></p><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/achievements/achievement.tsx#L271" target="_blank" rel="noreferrer">profectus/src/features/achievements/achievement.tsx:271</a></p><p><a href="https://github.com/profectus-engine/Profectus/blob/c386ace/src/features/challenges/challenge.tsx#L344" target="_blank" rel="noreferrer">profectus/src/features/challenges/challenge.tsx:344</a></p><h2 id="variables" tabindex="-1">Variables <a class="header-anchor" href="#variables" aria-label="Permalink to &quot;Variables&quot;"></a></h2><h3 id="default" tabindex="-1">default <a class="header-anchor" href="#default" aria-label="Permalink to &quot;default&quot;"></a></h3><p> <strong>default</strong>: <a href="./settings#settings"><code>Settings</code></a></p><p>The player settings object. Stores data that persists across all saves. Automatically saved to localStorage whenever changed.</p><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://gith