Updated Signals (markdown)

Florian Nücke 2014-04-21 04:59:08 -07:00
parent 059f9999ba
commit 73127b5dd8

@ -79,7 +79,17 @@ Robots
This signal is queued by robots when their inventory changes. Note that this only includes changes to the kind of item stored in a slot. For example, increasing or decreasing the size of an already present stack does not trigger this signal. However, swapping one item with another (say, torches with sticks) by hand will actually trigger *two* signals: one for the removal of the torches, one for putting the sticks into the temporarily empty slot. Swapping items using [[robot.transferTo()|API/Robot]] will even trigger *four* signals - the same thing, but for the two slots involved in the swap.
Also, this only fires for the actually addressable inventory of the robot, i.e. it does not trigger for changes in equipment (tool, card, upgrade).
Abstract Bus Card
-----------------
- `bus_message(protocolId: number, senderAddress: number, targetAddress: number, data: table, metadata: table)`
- `protocolId` is the protocol version that was used.
- `senderAddress` is the address of the device sending the message.
- `targetAddress` is the address of the device that the messages was intended for (-1 for network broadcasts).
- `data` is a table of the data that was sent.
- `metadata` is a table of data that are unique to the device that send the address.
Carriage
--------
**Important**: This component has moved to the OpenComponents addon.
- `carriage_moved(success: boolean[, reason:string[, x:number, y: number, z: number]])`
This signal is queued by the [[carriage component|Component/RedstoneInMotion]] after a move or simulate command was issued. The `success` parameter indicates whether the move or simulation was successful, i.e. whether the carriage could be moved. If the move failed, `reason` is the error message. Depending on the error message, (`x`, `y`, `z`) is the world coordinate of the block that caused the move to fail.