Module: features/upgrades/upgrade

Interfaces

Type aliases

GenericUpgrade

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

Defined in

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


Upgrade

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

Type parameters

NameType
Textends UpgradeOptions

Defined in

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

Variables

UpgradeType

Const UpgradeType: typeof UpgradeType

Defined in

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

Functions

createUpgrade

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

Type parameters

NameType
Textends UpgradeOptions

Parameters

NameType
optionsFunc() => T & ThisType<Upgrade<T>>

Returns

Upgrade<T>

Defined in

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


setupAutoPurchase

setupAutoPurchase(layer, autoActive, upgrades?): void

Parameters

NameTypeDefault value
layerGenericLayerundefined
autoActiveComputable<boolean>undefined
upgradesGenericUpgrade[][]

Returns

void

Defined in

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