Output remaining space on a train to the circuit network
Posted: Thu Dec 22, 2016 6:51 pm
Hello,
It would be nice to have the ability to output the remaining cargo space in a train to the circuit network. In particular, it should take into account locked stack slots (e.g. stack slots that have been constrained to hold a specific resource). Here's an example of how it would work:
Imagine an empty cargo wagon with 20 slots, 5 of which are locked to iron ore, 5 of which are locked to iron plate. The circuit network would output:
- 5 * 50 = 250 iron ore
- 5 * 100 = 500 iron plate
- 10 open slots = 10 "S" signal (slots available)
Now suppose the cargo wagon is the same as above, but the cargo wagon has exactly one iron ore in an open slot that can hold any resource. The circuit network would output:
- 5 * 50 + 1 * 49 = 299 iron ore
- 5 * 100 = 500 iron plate
- 10 - 1 open slots = 9 "S" signal
This would allow intelligent filling of trains using the circuit network, and in particular allow a circuit network to compute when a train can no longer be filled because all its slots are full.
It would be nice to have the ability to output the remaining cargo space in a train to the circuit network. In particular, it should take into account locked stack slots (e.g. stack slots that have been constrained to hold a specific resource). Here's an example of how it would work:
Imagine an empty cargo wagon with 20 slots, 5 of which are locked to iron ore, 5 of which are locked to iron plate. The circuit network would output:
- 5 * 50 = 250 iron ore
- 5 * 100 = 500 iron plate
- 10 open slots = 10 "S" signal (slots available)
Now suppose the cargo wagon is the same as above, but the cargo wagon has exactly one iron ore in an open slot that can hold any resource. The circuit network would output:
- 5 * 50 + 1 * 49 = 299 iron ore
- 5 * 100 = 500 iron plate
- 10 - 1 open slots = 9 "S" signal
This would allow intelligent filling of trains using the circuit network, and in particular allow a circuit network to compute when a train can no longer be filled because all its slots are full.