Class Flow.InventoryItem
Represents the properties of an object as it appears in the inventory.
Functions
InventoryItem(nameKey, slot, yOffset, scale, rot, axis, meshBits, action) | Create an InventoryItem. |
Functions
- InventoryItem(nameKey, slot, yOffset, scale, rot, axis, meshBits, action)
-
Create an InventoryItem.
Parameters:
- nameKey
string
key for the item's (localised) name.
Corresponds to an entry in strings.lua. - slot Flow.InvItem slot of inventory object to change
- yOffset
int
y-axis offset (positive values move the item down).
A value of about 100 will cause the item to display directly below its usual position. - scale
float
item size (1 being standard size).
A value of 0.5 will cause the item to render at half the size, and a value of 2 will cause the item to render at twice the size. - rot Rotation rotation about x, y, and z axes
- axis
RotationAxis
Axis to rotate about when the item is being looked at in the inventory.
Note that this is entirely separate from therot
field described above. Must be RotationAxis.X, RotationAxis.Y or RotationAxis.Z. e.g.myItem.rotAxisWhenCurrent = RotationAxis.X
- meshBits int Not currently implemented (will have no effect regardless of what you set it to)
- action
ItemAction
is this usable, equippable, or examinable?
Must be one of:EQUIP USE EXAMINE
e.g.
myItem.action = ItemAction.EXAMINE
Returns:
-
an InventoryItem
- nameKey
string
key for the item's (localised) name.