Class TInventory

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TInventory = class(specialize TFPGObjectList<TInventoryItem>)

Description

List of items, with a 3D object (like a player or creature) owning these items. Do not directly change this list, always use the owner (T3DAliveWithInventory) methods like T3DAliveWithInventory.PickItem or T3DAliveWithInventory.DropItem. They make sure that items are correctly stacked, and that TInventoryItem.Owner3D and memory management is good.

Hierarchy

  • TFPGObjectList
  • TInventory

Overview

Methods

Public constructor Create(const AOwner3D: T3DAliveWithInventory);
Public function FindResource(Resource: TItemResource): Integer;

Properties

Public property Owner3D: T3DAliveWithInventory read FOwner3D;

Description

Methods

Public constructor Create(const AOwner3D: T3DAliveWithInventory);
 
Public function FindResource(Resource: TItemResource): Integer;

Searches for item of given Resource. Returns index of first found, or -1 if not found.

Properties

Public property Owner3D: T3DAliveWithInventory read FOwner3D;

Owner of the inventory (like a player or creature). Never Nil, always valid for given inventory. All items on this list always have the same TInventoryItem.Owner3D value as the inventory they are in.


Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13