Inventory and Objects
The Object item describes objects stored in the inventory.
With the Inventory item, the inventory is manipulated.
| Item type | Object |
| Description | an object in the inventory |
| Action | - |
| Condition | true, if object is in inventory |
| Key | Type | Default | Description |
| description | string | | a short description0 |
| image | Images | | image to display |
| actions | [Action] | [] | list of tool actions |
| cursor | file | "" | the cursor to use if this object is the selected object |
Note: The cursor file is only used, if one or more tools are configured
to use this cursor when the object is the selected object in the inventory. If the cursor is set to @,
a cursor is created using the image of the object. (@ does not work for text images.)
| Item type | Inventory |
| Description | manipulation of inventory |
| Action | adds / removes objects to / from inventory |
| Condition | true, if action performed |
| Key | Type | Default | Description |
| object | Objects | <> | the object |
| position | int | -1 | position in inventory
(see definitions for special values) |
| select | bool | 0 | select object as current object for tool actions |
| insertAfter | Elems | <> | the position is relative to an object in the inventory |
| backwards | bool | 0 | the position is relative to the end of the inventory |
| update | bool | 1 | update flag; if false, the change will not take effect immediately |
Note: If the object of an Inventory item is <> and it is executed as the result of a mouse click
in the inventory to an object, the Inventory item is applied to the object clicked at. Thus, a useful tool
for the inventory is Tool {select | select | Inventory {<> | -3 | t}}
which makes an object the selected object if you click at it in the inventory.