Storage.Slot.Item
Description
A class that represents a storage slot item.
A storage slot item is a record of an item that is either assigned to the slot, or is currently in the slot. If the item is virtual, the slot item holds the label values of the item. A slot item is created when an item is assigned to the slot. A slot item is destroyed when the item is no longer associated with the slot, meaning the item is not assigned to the slot, and it is not currently within the slot.Properties
isVirtual | Returns whether the current slot item is virtual. For more information on virtualization, see the Storage System topic. |
item | Returns the flowitem associated with this slot item. Accessing this property will cause a virtualized item to be re-created. |
location | Returns the location of the flowitem associated with this slot item, relative to the storage object. |
pickRank | Returns the order that this item could be picked. This value depends on the item insertion order as well as the rack type. For example, the last item in a Floor Storage has a pickRank of 1. By contrast, the first item in a Gravity Flow Rack would have a pickRank of 1. |
rotation | Returns the rotation of the associated flowitem. |
size | Retursn the size of the associated flowitem. |
slot | Returns the slot associated with this slot item. |
storageItem | Returns the storage item for the flowitem associated with this slot item. Accessing this property will cause a virtualized item to be re-created. |
Methods
getLocation | Gets the item's location, relative to the storage object. |
Details
Storage.Slot.Item.isVirtual
readonly int isVirtual
Description
Returns whether the current slot item is virtual. For more information on virtualization, see the Storage System topic.
Storage.Slot.Item.item
readonly Object item
Description
Returns the flowitem associated with this slot item. Accessing this property will cause a virtualized item to be re-created.
Storage.Slot.Item.location
readonly Vec3 location
Description
Returns the location of the flowitem associated with this slot item, relative to the storage object.
Storage.Slot.Item.pickRank
readonly int pickRank
Description
Returns the order that this item could be picked. This value depends on the item insertion order as well as the rack type. For example, the last item in a Floor Storage has a pickRank of 1. By contrast, the first item in a Gravity Flow Rack would have a pickRank of 1.
Storage.Slot.Item.rotation
readonly Vec3 rotation
Description
Returns the rotation of the associated flowitem.
Storage.Slot.Item.slot
readonly Storage.Slot slot
Description
Returns the slot associated with this slot item.
Storage.Slot.Item.storageItem
readonly Storage.Item storageItem
Description
Returns the storage item for the flowitem associated with this slot item. Accessing this property will cause a virtualized item to be re-created.
Storage.Slot.Item.getLocation()
Vec3 getLocation( double xFactor , double yFactor , double zFactor ) |
Vec3 getLocation( Vec3 factors ) |
Parameters
xFactor | The x value of the point on the item where the location will be measured from. Measured as a percent of the item's size (0-1). |
yFactor | The y value of the point on the item where the location will be measured from. Measured as a percent of the item's size (0-1). |
zFactor | The z value of the point on the item where the location will be measured from. Measured as a percent of the item's size (0-1). |
factors | A vector representing the point on the item where the location will be measured from. Measured as a percent of the item's size (0-1). |
Returns
Vec3 | A vector holding the item's location. |
Description
Gets the item's location, relative to the storage object.
This code gets the item's location measured at its center.
Vec3 centerLoc = storageItem.getLocation(0.5,0.5,0.5);
Vec3 centerLoc = storageItem.getLocation(Vec3(0.5,0.5,0.5));