ix.inventory

Inventory manipulation and helper functions.

Functions

ix.inventory.Get(invID)

View source »

Retrieves an inventory table.

Parameters

  • invID number

    Index of the inventory

Returns

ix.inventory.Restore(invID, width, height, callback)

View source »

Loads an inventory and associated items from the database into memory. If you are passing a table into invID, it requires a table where the key is the inventory ID, and the value is a table of the width and height values. See below for an example.

Parameters

  • invID

    Inventory ID or table of inventory IDs

  • width number

    Width of inventory (this is not used when passing a table to invID)

  • height number

    Height of inventory (this is not used when passing a table to invID)

  • callback function

    Function to call when inventory is restored

Example Usage

ix.inventory.Restore({
	[10] = {5, 5},
	[11] = {7, 4}
})
-- inventories 10 and 11 with sizes (5, 5) and (7, 4) will be loaded