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.
Output remaining space on a train to the circuit network
Moderator: ickputzdirwech
Re: Output remaining space on a train to the circuit network
Poll: Circuit network features for 0.15
As far as it seems with 0.15 you will be able to read a train's contents via Circuit Network. Or at least the poll states that they "implemented" it.
May not be exactly how you want it to work but given you know the amount of train wagons, etc you can do basic calculation on how much space there's still available in the train yourself subtracting what's already inside. Might not be that efficient though if items are split over multiple stacks.
As far as it seems with 0.15 you will be able to read a train's contents via Circuit Network. Or at least the poll states that they "implemented" it.
May not be exactly how you want it to work but given you know the amount of train wagons, etc you can do basic calculation on how much space there's still available in the train yourself subtracting what's already inside. Might not be that efficient though if items are split over multiple stacks.
Re: Output remaining space on a train to the circuit network
Yes, this is a pretty awesome development. But, it turns out that you can't calculate available space not only because of the slip problem you mention, but also some stack slots may be locked to a specific resource.MeduSalem wrote:Poll: Circuit network features for 0.15
As far as it seems with 0.15 you will be able to read a train's contents via Circuit Network. Or at least the poll states that they "implemented" it.
May not be exactly how you want it to work but given you know the amount of train wagons, etc you can do basic calculation on how much space there's still available in the train yourself subtracting what's already inside. Might not be that efficient though if items are split over multiple stacks.