-- TEN 1.11.1.1 API -- This file is auto-generated and for IntelliSense purposes only! -- Any changes made here will not be reflected in the engine. ---@meta ---Inventory module for Tomb Engine ---@class Inventory Inventory = {} ---Add an item to the player's inventory. ---@param objectID ObjID # Object ID of the item to add. ---@param count integer? # The amount of items to add. Default is the yield from a single pickup, e.g. 1 from a medipack, 12 from a flare pack. (default: `1`) ---@param addToPickupSummary boolean? # If true, display the item in the pickup summary. Default is false. (default: `false`) function Inventory.GiveItem(objectID, count, addToPickupSummary) end ---Remove an item from the player's inventory. ---@param Object ObjID # ID of the item to remove. ---@param count integer? # The amount of items to remove. Default is the yield from a single pickup, e.g. 1 from a medipack, 12 from a flare pack. (default: `1`) function Inventory.TakeItem(Object, count) end ---Get the amount of an item held in the player's inventory. ---@param objectID ObjID # Object ID of the item to check. ---@return integer # The amount of items. -1 indicates infinity. function Inventory.GetItemCount(objectID) end ---Set the amount of an item in the player's inventory. ---@param objectID ObjID # Object ID of the item amount to set. ---@param count integer # The amount of items to set. -1 indicates infinity. function Inventory.SetItemCount(objectID, count) end ---Try to use an item. ---For equippable or consumable items, standard game conditions will apply - for example, firearms can't be used underwater, and keys or puzzle items can only be used in close proximity to a corresponding key or puzzle hole. ---@param objectID ObjID # Object ID to use. Must be present in the inventory. function Inventory.UseItem(objectID) end ---Get last item that was used in the player's inventory. ---This value will be valid only for a single frame after exiting inventory, after which Lara says "No". ---Therefore, this function must be preferably used either in OnLoop or OnUseItem events. ---@return ObjID # Last item used in the inventory. function Inventory.GetUsedItem() end ---Set last item that was used in the player's inventory. ---Will only be valid for the next frame. ---If not processed by the game, Lara will say "No". ---@param objectID ObjID # Object ID of the item to select from inventory. Must be present in the inventory. function Inventory.SetUsedItem(objectID) end ---Clear last item used in the player's inventory. ---When this function is used in OnUseItem level function, it allows to override existing item functionality. ---For items without existing functionality, this function is needed to avoid Lara saying "No" after using it. function Inventory.ClearUsedItem() end ---Gets the item that is about to be focused in the inventory. ---Can be used to intercept inventory calls with a request to select a particular item. ---@return ObjID # objectID Object ID of the item set. function Inventory.GetFocusedItem() end ---Opens the inventory and focuses on the specified item, if it is available. ---@param objectID ObjID # Object ID of the item to set. Must be present in the inventory. function Inventory.SetFocusedItem(objectID) end ---Converts object ID to inventory item ID. ---To be used by custom inventory module. ---@param objectID ObjID # Object ID of the item to convert. ---@return integer # Inventory item ID of the object. function Inventory.ConvertObjectToInventoryItem(objectID) end ---Converts inventory item ID to object ID. ---To be used by custom inventory module. ---@param inventoryID integer # Inventory item ID to convert. ---@return ObjID # Object ID of the item. function Inventory.ConvertInventoryItemToObject(inventoryID) end ---Resets inventory to a default state. ---Clears inventory item list and adds default set of items, including a compass, pistols, 3 flares, 3 small medipacks, and 1 large medipack. function Inventory.ResetToDefault() end return Inventory