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:73


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:60

Variables

UpgradeType

Const UpgradeType: typeof UpgradeType

Defined in

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

Functions

createUpgrade

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

Type parameters

NameType
Textends UpgradeOptions

Parameters

NameType
optionsFuncOptionsFunc<T, Upgrade<T>, BaseUpgrade>

Returns

Upgrade<T>

Defined in

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


setupAutoPurchase

setupAutoPurchase(layer, autoActive, upgrades?): void

Parameters

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

Returns

void

Defined in

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