Gorilla.Utils.Inventory

Unit Gorilla.Utils.Inventory.pas

Classes

Enumerations

  • enum  TGorillaInventoryCollectState  = ( None, Allowed, Collected, QuantityExceeded, Disabled, NotFound, Missing ) ;
  • enum  TGorillaInventoryManufacturingState  = ( Undefined, Processing, Completed, Failed ) ;
  • enum  TManufacturingProcessKind  = ( NewItem, Upgrading, Downgrading ) ;
  • enum  TManufacturingNotificationType  = ( mntStarted, mntPaused, mntAborted, mntCompleted, mntProcessing ) ;

Constants

  • const GORILLA_INVENTORY_VISUALITEM_RESOURCE_IMGLOD0 : Integer = $0;
  • const GORILLA_INVENTORY_VISUALITEM_RESOURCE_IMGLOD1 : Integer = $1;
  • const GORILLA_INVENTORY_VISUALITEM_RESOURCE_IMGLOD2 : Integer = $2;
  • const GORILLA_INVENTORY_VISUALITEM_RESOURCE_MODEL : Integer = $3;

TGorillaInventoryCustomItem

The custom class for all item classes.

Ancestors

Members

Fields

Methods

Properties

TGorillaInventoryItemTemplate

Is a kind of prototype for all collectable items. Need to be pre-instanciated when creating the inventory.

Ancestors

Members

Fields

Methods

Properties

TGorillaInventoryItemCollection

The basic collection for item-templates and collectables

Ancestors

TGorillaInventoryCollectablesCollection

This is an extended collection of TGorillaInventoryItemCollection. We now have a "ToArray" function to easily return an array of all collectables to submit it to the manufacture() method.

Ancestors

Members

TGorillaInventoryIngredient

An inventory ingredient is used f.e. for manufacturing multiple items to a single item, f.e. you have 1 bough + 1 elastic band = 1 slingshot For every ingredient you can set a quantity to define how many of this specific item is needed. By default this value is 1.

Ancestors

Members

TGorillaInventoryManufacturingProcess

For every manufacturing process inside of the manufacturer a new instance will be created to manage multiple processing on the same manufacturer. For example: You want to build 5 cars from ingredients parallel.

Ancestors

Members

Fields

Methods

Properties

TGorillaInventoryManufacturer

Used to combine a specific number of items to a new item. The component offers a timespan to simulate a manufacturing process. If TimeNeeded > 0: a timer-event will be started When this event is thrown, the new item will be available. If TimeNeeded <= 0: the manufacturing process will be executed immediatly

Ancestors

Members

Fields

Methods

Properties

TGorillaInventory

Inventory component for managing templates, collected items, groups and manufacturing processes.

Ancestors

Members

Fields

Methods

Properties