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('

Module: game/settings

Interfaces

Settings

Settings: Object

The player's settings object.

NameTypeDescription
activestringThe ID of the active save.
alignUnitsbooleanWhether to align modifiers to the unit.
hideChallengesboolean-
msDisplayAchievementDisplay-
savesstring[]The IDs of all created saves.
showTPSbooleanWhether or not to show the current ticks per second in the lower left corner of the page.
themeThemesThe current theme to display the game in.
unthrottledbooleanWhether or not to cap the project at 20 ticks per second.

Defined in

profectus/src/game/settings.ts:10

profectus/src/features/achievements/achievement.tsx:271

profectus/src/features/challenges/challenge.tsx:344

Variables

default

default: Settings

The player settings object. Stores data that persists across all saves. Automatically saved to localStorage whenever changed.

Defined in

profectus/src/game/settings.ts:56


gameComponents

Const gameComponents: CoercableComponent[]

A list of components to add to the root of the page.

Defined in

profectus/src/game/settings.ts:119


infoComponents

Const infoComponents: CoercableComponent[]

A list of components to show in the info modal.

Defined in

profectus/src/game/settings.ts:112


settingFields

Const settingFields: CoercableComponent[]

A list of fields to append to the settings modal.

Defined in

profectus/src/game/settings.ts:105

Functions

hardResetSettings

hardResetSettings(): void

A function that erases all player settings, including all saves.

Returns

void

Defined in

profectus/src/game/settings.ts:58


loadSettings

loadSettings(): void

Loads the player settings from localStorage. Calls the GlobalEvents.loadSettings event for custom properties to be included. Custom properties should be added by the file they relate to, so they won't be included if the file is tree shaken away. Custom properties should also register the field to modify said setting using registerSettingField.

Returns

void

Defined in

profectus/src/game/settings.ts:77


registerGameComponent

registerGameComponent(component): void

Register a component to be displayed at the root of the page.

Parameters
NameType
componentCoercableComponent
Returns

void

Defined in

profectus/src/game/settings.ts:121


registerInfoComponent

registerInfoComponent(component): void

Register a component to be displayed in the info modal.

Parameters
NameType
componentCoercableComponent
Returns

void

Defined in

profectus/src/game/settings.ts:114


registerSettingField

registerSettingField(component): void

Register a field to be displayed in the settings modal.

Parameters
NameType
componentCoercableComponent
Returns

void

Defined in

profectus/src/game/settings.ts:107

',80),s=[n];function i(d,l,c,h,f,g){return a(),t("div",null,s)}const m=e(o,[["render",i]]);export{u as __pageData,m as default};