TL;DR
Similar to my other idea, I think trains should have labels. Or to put it another way, trains should have a built in constant combinator, accessed by train stops.What ?
Trains should have a slot in their UI where you can select an arbitrary item stack. This would work exactly like selecting items in filter inserters or constant combinators. This label could be displayed in various places: on the train in alt-view, on the train on the map, and beside the name in the train UI.There's also another utility for this. Right now, you can get train stops to read the "unique id" of a stopped train. The train stop would also have an option to read the train labels and output the label as a signal like the constant combinator.
Why ?
This would make identifying trains at a glance easier than ever, especially in cluttered areas and UIs. (The train UI can get ridiculous pretty fast, and trains are pretty unidentifiable on the map.)Getting train ids is useful, and has purpose, but sometimes you don't actually care about which particular train is stopped, but what kind of train is stopped. Reading the train inventory doesn't work if the train is empty. You can map train ids to train types through circuits, but this is kludgey, and prone to breakage when train ids change, or you make new trains. Reading train labels would provide a simple and elegant solution to this, and provides interesting opportunities for station design.