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

Function FindJoiningStation

src/station_cmd.cpp:1301–1304  ·  view source on GitHub ↗

* Find a nearby station that joins this station. * @param existing_station an existing station we build over * @param station_to_join the station to join to * @param adjacent whether adjacent stations are allowed * @param ta the area of the newly build station * @param st 'return' pointer for the found station * @return command cost with the error or 'okay' */

Source from the content-addressed store, hash-verified

1299 * @return command cost with the error or 'okay'
1300 */
1301static CommandCost FindJoiningStation(StationID existing_station, StationID station_to_join, bool adjacent, TileArea ta, Station **st)
1302{
1303 return FindJoiningBaseStation<Station, STR_ERROR_MUST_REMOVE_RAILWAY_STATION_FIRST>(existing_station, station_to_join, adjacent, ta, st, [](const Station *) -> bool { return true; });
1304}
1305
1306/**
1307 * Find a nearby waypoint that joins this waypoint.

Callers 3

CmdBuildRailStationFunction · 0.85
CmdBuildAirportFunction · 0.85
CmdBuildDockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected