Skip to main content

Shop2InitVars

Namespace with shop-specific variables that are expected to remain constant over the course of the (sub-)screens lifetime.

Index

Variables

Background

Background: string = "Shop"

The shop background

readonlyDefaults

Defaults: Readonly<{ GroupDescriptions: any; Items: any; Preview: any; PreviousScreen: any; Background: string }>

Default values that should be restored to the container upon calling Reset

GroupDescriptions

GroupDescriptions: Record<string, Record<string, Set<AssetGroupName>>> = {}

A record mapping group category descriptions, to AssetGroup.Description to a set with all respective (shop-elligble) group names.

Note that keys will vary based on the users active language.

Items

Items: readonly ShopItem[] = []

Super set of all items that be bought or sold

Preview

Preview: Character = null

The shop preview character

PreviousScreen

PreviousScreen: [module: ModuleType, screen: string] = null

The module- and screen-name of the previous screen (if any)

Functions

readonlyReset

  • Reset(): void
  • Returns void