import{_ as e,c as t,o as a,a as r}from"./app.ab34650d.js";const m=JSON.parse('{"title":"Module: game/settings","description":"","frontmatter":{"editLink":false},"headers":[{"level":2,"title":"Interfaces","slug":"interfaces"},{"level":2,"title":"Variables","slug":"variables"},{"level":3,"title":"default","slug":"default"},{"level":3,"title":"gameComponents","slug":"gamecomponents"},{"level":3,"title":"infoComponents","slug":"infocomponents"},{"level":3,"title":"settingFields","slug":"settingfields"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"hardResetSettings","slug":"hardresetsettings"},{"level":3,"title":"loadSettings","slug":"loadsettings"},{"level":3,"title":"registerGameComponent","slug":"registergamecomponent"},{"level":3,"title":"registerInfoComponent","slug":"registerinfocomponent"},{"level":3,"title":"registerSettingField","slug":"registersettingfield"}],"relativePath":"api/modules/game/settings.md","lastUpdated":null}'),n={name:"api/modules/game/settings.md"},s=r('

Module: game/settings

Interfaces

Variables

default

\u2022 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:53


gameComponents

\u2022 Const gameComponents: CoercableComponent[]

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

Defined in

profectus/src/game/settings.ts:115


infoComponents

\u2022 Const infoComponents: CoercableComponent[]

A list of components to show in the info modal.

Defined in

profectus/src/game/settings.ts:108


settingFields

\u2022 Const settingFields: CoercableComponent[]

A list of fields to append to the settings modal.

Defined in

profectus/src/game/settings.ts:101

Functions

hardResetSettings

\u25B8 hardResetSettings(): void

Returns

void


loadSettings

\u25B8 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


registerGameComponent

\u25B8 registerGameComponent(component): void

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

Parameters

NameType
componentCoercableComponent

Returns

void


registerInfoComponent

\u25B8 registerInfoComponent(component): void

Register a component to be displayed in the info modal.

Parameters

NameType
componentCoercableComponent

Returns

void


registerSettingField

\u25B8 registerSettingField(component): void

Register a field to be displayed in the settings modal.

Parameters

NameType
componentCoercableComponent

Returns

void

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