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

Function ClickTile_Station

src/station_cmd.cpp:3824–3837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3822
3823
3824static bool ClickTile_Station(TileIndex tile)
3825{
3826 const BaseStation *bst = BaseStation::GetByTile(tile);
3827
3828 if (bst->facilities.Test(StationFacility::Waypoint)) {
3829 ShowWaypointWindow(Waypoint::From(bst));
3830 } else if (IsHangar(tile)) {
3831 const Station *st = Station::From(bst);
3832 ShowDepotWindow(st->airport.GetHangarTile(st->airport.GetHangarNum(tile)), VEH_AIRCRAFT);
3833 } else {
3834 ShowStationViewWindow(bst->index);
3835 }
3836 return true;
3837}
3838
3839static VehicleEnterTileStates VehicleEnter_Station(Vehicle *v, TileIndex tile, int x, int y)
3840{

Callers

nothing calls this directly

Calls 7

ShowWaypointWindowFunction · 0.85
IsHangarFunction · 0.85
ShowDepotWindowFunction · 0.85
ShowStationViewWindowFunction · 0.85
TestMethod · 0.80
GetHangarTileMethod · 0.80
GetHangarNumMethod · 0.80

Tested by

no test coverage detected