import{_ as e,c as a,o as t,N as r}from"./chunks/framework.0799945b.js";const f=JSON.parse('{"title":"Module: features/upgrades/upgrade","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/upgrades/upgrade.md","lastUpdated":null}'),d={name:"api/modules/features/upgrades/upgrade.md"},o=r('

Module: features/upgrades/upgrade

Components

Interfaces

Type Aliases

GenericUpgrade

Ƭ GenericUpgrade: Replace<Upgrade<UpgradeOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Upgrade object.

Defined in

profectus/src/features/upgrades/upgrade.ts:106


Upgrade

Ƭ Upgrade<T>: Replace<T & BaseUpgrade, { classes: GetComputableType<T["classes"]> ; display: GetComputableType<T["display"]> ; mark: GetComputableType<T["mark"]> ; requirements: GetComputableType<T["requirements"]> ; style: GetComputableType<T["style"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a feature that can be purchased a single time.

Type parameters

NameType
Textends UpgradeOptions

Defined in

profectus/src/features/upgrades/upgrade.ts:93

Variables

UpgradeType

Const UpgradeType: typeof UpgradeType

A symbol used to identify Upgrade features.

Defined in

profectus/src/features/upgrades/upgrade.ts:40

Functions

createUpgrade

createUpgrade<T>(optionsFunc): Upgrade<T>

Lazily creates an upgrade with the given options.

Type parameters

NameType
Textends UpgradeOptions

Parameters

NameTypeDescription
optionsFuncOptionsFunc<T, BaseUpgrade, GenericUpgrade>Upgrade options.

Returns

Upgrade<T>

Defined in

profectus/src/features/upgrades/upgrade.ts:117


setupAutoPurchase

setupAutoPurchase(layer, autoActive, upgrades?): void

Utility to auto purchase a list of upgrades whenever they're affordable.

Parameters

NameTypeDefault valueDescription
layerGenericLayerundefinedThe layer the upgrades are apart of
autoActiveComputable<boolean>undefinedWhether or not the upgrades should currently be auto-purchasing
upgradesGenericUpgrade[][]The specific upgrades to upgrade. If unspecified, uses all upgrades on the layer.

Returns

void

Defined in

profectus/src/features/upgrades/upgrade.ts:190

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