Apologies, writing on phone as away from computer.
Looking for some guidance, or hint, for a sensible way to find the max CARGO or PASSENGER (SimEntities) waiting at any terminal used by line. This needs to be done for all lines.
A brute force way is to use getSimCargoForLine (and Person equivalent), and then cycle through them to fetch the SIM_CARGO_AT_TERMINAL (or ENTITY/PERSON) component.
This will however be rather inefficient as the same SimEntity will be applicable for many lines.
Is it possible to, for instance, cycle through each station (foreach), and then retrieve just the SimEntities waiting at that specific station?
The API reference is not particularly clear, and seems to be missing lots of existing functionality. Any assistance is appreciated!
Edit: I've noticed the following function exists:
getSimCargoAtTerminalForTransportNetwork(tnEntity)
Obtains all cargo that is waiting at the terminal.
Parameters:
tnEntity Entity the entity of the transport network
It is however unclear what tnEntity is in this instance, and how it is obtained. What constitutes an entity of the transport network? A station?