mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-04 03:27:19 -04:00
Updated Signals (markdown)
parent
49ccb3db0f
commit
2924874ed2
@ -75,3 +75,8 @@ Robots
|
||||
- `inventory_changed(slot: number)`
|
||||
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).
|
||||
|
||||
Carriage
|
||||
--------
|
||||
- `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.
|
Loading…
x
Reference in New Issue
Block a user