MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetFlowFromVia

Method GetFlowFromVia

src/station_cmd.cpp:5359–5364  ·  view source on GitHub ↗

* Get the flow from a specific station via a specific other station. * @param from Origin station to look for. * @param via Remote station to look for. * @return flow share originating at 'from' and going to 'via'. */

Source from the content-addressed store, hash-verified

5357 * @return flow share originating at 'from' and going to 'via'.
5358 */
5359uint FlowStatMap::GetFlowFromVia(StationID from, StationID via) const
5360{
5361 FlowStatMap::const_iterator i = this->find(from);
5362 if (i == this->end()) return 0;
5363 return i->second.GetShare(via);
5364}
5365
5366static CommandCost CheckBuildAbove_Station(TileIndex tile, DoCommandFlags, Axis, int height)
5367{

Callers 1

CountCargoPlannedMethod · 0.80

Calls 3

GetShareMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected