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

Function FindJoiningRoadStop

src/station_cmd.cpp:2007–2010  ·  view source on GitHub ↗

* Find a nearby station that joins this road stop. * @param existing_stop an existing road stop 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

2005 * @return command cost with the error or 'okay'
2006 */
2007static CommandCost FindJoiningRoadStop(StationID existing_stop, StationID station_to_join, bool adjacent, TileArea ta, Station **st)
2008{
2009 return FindJoiningBaseStation<Station, STR_ERROR_MUST_REMOVE_ROAD_STOP_FIRST>(existing_stop, station_to_join, adjacent, ta, st, [](const Station *) -> bool { return true; });
2010}
2011
2012/**
2013 * Calculates cost of new road stops within the area.

Callers 1

CmdBuildRoadStopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected