Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Inventory

Velt's inventory utility, particularly useful for serializing inventories with velt-storage

Hierarchy

  • Inventory

Index

Constructors

Methods

Constructors

constructor

  • new Inventory(entity: any): Inventory
  • new Inventory(contents: any, armor: any): Inventory
  • Initialize an inventory with the Inventory utility

    Parameters

    • entity: any

    Returns Inventory

  • Parameters

    • contents: any
    • armor: any

    Returns Inventory

Methods

give

  • give(entity: any, opts?: { clear: boolean }): void
  • Give the given entity all the items in this inventory, including armor

    Parameters

    • entity: any

      The entity to give the items of this inventory to

    • Optional opts: { clear: boolean }

      The options, which is just the option of clearing the inventory before giving it the items

      • clear: boolean

    Returns void

Generated using TypeDoc