Much like the booster rail implementation, the segment entry and exit events will be used to detect the presence of a cart on it. This can be done by maintaining a count of the number of vehicles on top of the rail; a counter is incremented and decremented every time the entry and exit events are called respectively. The counter method may seem unnecessary at first, but will come in handy when the multi-axle carts are released.
On every update, if the above defined counter is non-zero, there is something on top of the rail and a signal is emitted.
Possible uses
As a trigger to initiate the unloading process once a cart carrying items reaches its destination
As a general signal generator equivalent to the Signalling module's pressure plate but for carts
Description
The rail will emit a signal of infinite strength for the duration a vehicle is on it, much like the pressure plate in the signalling module.
Dependencies
Proposed Implementation
Much like the booster rail implementation, the segment entry and exit events will be used to detect the presence of a cart on it. This can be done by maintaining a count of the number of vehicles on top of the rail; a counter is incremented and decremented every time the entry and exit events are called respectively. The counter method may seem unnecessary at first, but will come in handy when the multi-axle carts are released.
On every
update
, if the above defined counter is non-zero, there is something on top of the rail and a signal is emitted.Possible uses