#include <station_base.h>

Public Member Functions | |
| RoadStop * | GetPrimaryRoadStop (RoadStopType type) const |
| RoadStop * | GetPrimaryRoadStop (const Vehicle *v) const |
| Get the primary road stop (the first road stop) that the given vehicle can load/unload. | |
| const AirportFTAClass * | Airport () const |
| Station (TileIndex tile=INVALID_TILE) | |
| virtual | ~Station () |
| Clean up a station by clearing vehicle orders and invalidating windows. | |
| void | AddFacility (byte new_facility_bit, TileIndex facil_xy) |
| Called when new facility is built on the station. | |
| void | MarkDirty () const |
| Mark the sign of a station dirty for repaint. | |
| void | MarkTilesDirty (bool cargo_change) const |
| Marks the tiles of the station as dirty. | |
| bool | TileBelongsToRailStation (TileIndex tile) const |
| uint | GetPlatformLength (TileIndex tile, DiagDirection dir) const |
| Determines the REMAINING length of a platform, starting at (and including) the given tile. | |
| uint | GetPlatformLength (TileIndex tile) const |
| Obtain the length of a platform. | |
| bool | IsBuoy () const |
| Determines whether a station is a buoy only. | |
| bool | IsValid () const |
| Determines whether a station exists. | |
| uint | GetCatchmentRadius () const |
| Determines the catchment radius of the station. | |
Data Fields | |
| TileIndex | xy |
| RoadStop * | bus_stops |
| RoadStop * | truck_stops |
| TileIndex | train_tile |
| TileIndex | airport_tile |
| TileIndex | dock_tile |
| Town * | town |
| char * | name |
| Custom name. | |
| IndustryType | indtype |
| Industry type to get the name from. | |
| StringID | string_id |
| Default name (town area) of station. | |
| ViewportSign | sign |
| uint16 | had_vehicle_of_type |
| byte | time_since_load |
| byte | time_since_unload |
| byte | delete_ctr |
| OwnerByte | owner |
| byte | facilities |
| byte | airport_type |
| byte | trainst_w |
| byte | trainst_h |
| uint8 | num_specs |
| List of custom stations (StationSpecs) allocated to the station. | |
| StationSpecList * | speclist |
| Date | build_date |
| Date of construction. | |
| uint64 | airport_flags |
| stores which blocks on the airport are taken. was 16 bit earlier on, then 32 | |
| byte | last_vehicle_type |
| std::list< Vehicle * > | loading_vehicles |
| GoodsEntry | goods [NUM_CARGO] |
| Goods at this station. | |
| uint16 | random_bits |
| byte | waiting_triggers |
| uint8 | cached_anim_triggers |
| Combined animation trigger bitmask, used to determine if trigger processing should happen. | |
| StationRect | rect |
| Station spread out rectangle (not saved) maintained by StationRect_xxx() functions. | |
Static Public Attributes | |
| static const int | cDebugCtorLevel = 5 |
Definition at line 113 of file station_base.h.
| Station::~Station | ( | ) | [virtual] |
Clean up a station by clearing vehicle orders and invalidating windows.
Aircraft-Hangar orders need special treatment here, as the hangars are actually part of a station (tiletype is STATION), but the order type is OT_GOTO_DEPOT.
Definition at line 52 of file station.cpp.
References PoolItem< T, Tid, Tpool >::CleaningPool(), DeleteStationNews(), DeleteWindowById(), goods, PoolItem< T, Tid, Tpool >::index, INVALID_TILE, InvalidateWindowData(), IsNormalAircraft(), MarkDirty(), name, and RemoveOrderFromAllVehicles().
| RoadStop * Station::GetPrimaryRoadStop | ( | const Vehicle * | v | ) | const |
Get the primary road stop (the first road stop) that the given vehicle can load/unload.
| v | the vehicle to get the first road stop for |
Definition at line 106 of file station.cpp.
References CC_PASSENGERS, RoadStop::next, ROADSTOP_BUS, ROADSTOP_TRUCK, ROADTYPES_NONE, and RoadStop::xy.
| void Station::AddFacility | ( | byte | new_facility_bit, | |
| TileIndex | facil_xy | |||
| ) |
Called when new facility is built on the station.
If it is the first facility it initializes also 'xy' and 'random_bits' members
Definition at line 125 of file station.cpp.
References _date, and build_date.
Referenced by CmdBuildAirport(), CmdBuildDock(), CmdBuildRailroadStation(), and CmdBuildRoadStop().
| uint Station::GetPlatformLength | ( | TileIndex | tile, | |
| DiagDirection | dir | |||
| ) | const |
Determines the REMAINING length of a platform, starting at (and including) the given tile.
| tile | the tile from which to start searching. Must be a railway station tile | |
| dir | The direction in which to search. |
Definition at line 219 of file station.cpp.
References DIAGDIR_END, and TileOffsByDiagDir().
Referenced by LoadUnloadVehicle().
| uint Station::GetPlatformLength | ( | TileIndex | tile | ) | const |
Obtain the length of a platform.
| tile | A tile that contains the platform in question |
Definition at line 189 of file station.cpp.
References AXIS_X, and TileDiffXY().
| bool Station::IsBuoy | ( | ) | const |
Determines whether a station is a buoy only.
Definition at line 237 of file station.cpp.
Referenced by CompanyStationsWindow::BuildStationsList(), FindStationsAroundTiles(), CompanyStationsWindow::OnClick(), CompanyStationsWindow::OnPaint(), and UpdateStationAcceptance().
| bool Station::IsValid | ( | ) | const [inline] |
Determines whether a station exists.
Definition at line 202 of file station_base.h.
References INVALID_TILE.
Referenced by WhoCanServiceIndustry().
| uint Station::GetCatchmentRadius | ( | ) | const |
Determines the catchment radius of the station.
Definition at line 245 of file station.cpp.
References _settings_game, CA_UNMODIFIED, AirportFTAClass::catchment, INVALID_TILE, StationSettings::modified_catchment, and GameSettings::station.
Referenced by DeliverGoodsToIndustry(), FindStationsAroundTiles(), and UpdateStationAcceptance().
1.5.6