|
OpenTTD Source 20260917-master-gec444f7315
|
Implementation of the station base class. More...
#include "stdafx.h"#include "core/flatset_type.hpp"#include "company_func.h"#include "company_base.h"#include "roadveh.h"#include "viewport_func.h"#include "viewport_kdtree.h"#include "command_func.h"#include "news_func.h"#include "aircraft.h"#include "vehiclelist.h"#include "core/pool_func.hpp"#include "station_base.h"#include "station_kdtree.h"#include "roadstop_base.h"#include "industry.h"#include "town.h"#include "core/random_func.hpp"#include "linkgraph/linkgraph.h"#include "linkgraph/linkgraphschedule.h"#include "table/strings.h"#include "safeguards.h"Go to the source code of this file.
Functions | |
| void | RebuildStationKdtree () |
| static uint | GetTileCatchmentRadius (TileIndex tile, const Station *st) |
| Get the catchment size of an individual station tile. | |
| CommandCost | CheckStationSpread (TileArea area, const TileArea &new_area) |
| Check if adding a new area to a station will exceed the maximum station spread. | |
| Money | AirportMaintenanceCost (Owner owner) |
| Calculates the maintenance cost of all airports of a company. | |
Variables | |
| StationPool | _station_pool ("Station") |
| The pool of stations. | |
| StationKdtree | _station_kdtree {} |
Implementation of the station base class.
Definition in file station.cpp.
| Money AirportMaintenanceCost | ( | Owner | owner | ) |
Calculates the maintenance cost of all airports of a company.
| owner | Company. |
Definition at line 550 of file station.cpp.
References _price, Airport, InfrastructureAirport, and SpecializedStation< Station, false >::Iterate().
Referenced by CompaniesGenStatistics().
| CommandCost CheckStationSpread | ( | TileArea | area, |
| const TileArea & | new_area ) |
Check if adding a new area to a station will exceed the maximum station spread.
| area | The existing station spread area. |
| new_area | The new area to add. |
Definition at line 528 of file station.cpp.
References _settings_game, OrthogonalTileArea::Add(), CMD_ERROR, OrthogonalTileArea::h, INVALID_TILE, IsValidTile(), OrthogonalTileArea::tile, TileAddWrap(), and OrthogonalTileArea::w.
Referenced by AddNearbyStation(), BuildStationPart(), CmdBuildAirport(), CmdBuildRailStation(), CmdBuildRailWaypoint(), CmdBuildRoadStop(), and CmdBuildRoadWaypoint().
Get the catchment size of an individual station tile.
| tile | Station tile to get catchment size of. |
| st | Associated station of station tile. |
Definition at line 314 of file station.cpp.
References _settings_game, Airport, Station::airport, Buoy, Bus, CA_BUS, CA_DOCK, CA_NONE, CA_TRAIN, CA_TRUCK, CA_UNMODIFIED, AirportSpec::catchment, Dock, Airport::GetSpec(), GetStationType(), IsTileType(), Oilrig, Rail, RailWaypoint, RoadWaypoint, Station, and Truck.
Referenced by Station::RecomputeCatchment().
| void RebuildStationKdtree | ( | ) |
Definition at line 42 of file station.cpp.
| StationKdtree _station_kdtree {} |
Definition at line 40 of file station.cpp.