InvType¶
Overview¶
A InvType config contains the descriptive data necessary for the game to populate an Inventory.
These config types can be found within the config.Inv table:
config.Inv.AXESHOP
config.Inv["BANK"]
config.Inv.FromID(456) -- config.Inv.ROGUESDEN_SHOP_SKILLCAPE_TRIMMED
Info
An InvType is a Proxy usertype, which means it is safe to copy and store in your scripts.
It cannot, however, be used with any persistent storage.
Information available within an InvType includes:
- Inventory size
- Stock Count
- TODO
Examples¶
-- Access an InvType config directly by using its name
local metalBankCfg = config.Inv.METAL_BANK
-- or by ID lookup
local metalBankCfg = config.Inv.FromID(id.Inv.METAL_BANK)
-- Retrieve the InvType(s) being used by an Inventory
-- TODO
Constructors¶
Info
This usertype has no constructor, and you cannot create your own.
Properties¶
Info
All properties are read-only.
| Name | Type | Description |
|---|---|---|
| id | Integer | The ID of this config type. |
| configName | String | The name of this config, i.e. "METAL_BANK". |
| typeName | String | The type of this config. Will always be "Inv". |
| size | Integer | The number of inventory slots in this config. |
| stockCount | Integer | The number of stock ObjTypes in this config. |