#include "station_type.h"
#include "sprite.h"
#include "rail_type.h"
#include "road_type.h"
#include "tile_type.h"
#include "cargo_type.h"
#include "vehicle_type.h"
Go to the source code of this file.
Functions | |
void | ModifyStationRatingAround (TileIndex tile, Owner owner, int amount, uint radius) |
void | FindStationsAroundTiles (TileIndex tile, int w_prod, int h_prod, StationList *stations) |
void | ShowStationViewWindow (StationID station) |
Opens StationViewWindow for given station. | |
void | UpdateAllStationVirtCoords () |
Update the virtual coords needed to draw the station sign for all stations. | |
CargoArray | GetProductionAroundTiles (TileIndex tile, int w, int h, int rad) |
Get the cargo types being produced around the tile (in a rectangle). | |
CargoArray | GetAcceptanceAroundTiles (TileIndex tile, int w, int h, int rad, uint32 *always_accepted=NULL) |
Get the acceptance of cargos around the tile in 1/8. | |
void | UpdateStationAcceptance (Station *st, bool show_msg) |
Update the acceptance for a station. | |
const DrawTileSprites * | GetStationTileLayout (StationType st, byte gfx) |
void | StationPickerDrawSprite (int x, int y, StationType st, RailType railtype, RoadType roadtype, int image) |
bool | HasStationInUse (StationID station, CompanyID company) |
Tests whether the company's vehicles have this station in orders When company == INVALID_COMPANY, then check all vehicles. | |
RoadStop * | GetRoadStopByTile (TileIndex tile, RoadStopType type) |
uint | GetNumRoadStops (const Station *st, RoadStopType type) |
void | DeleteOilRig (TileIndex t) |
bool | IsStationTileBlocked (TileIndex tile) |
bool | IsStationTileElectrifiable (TileIndex tile) |
void | UpdateAirportsNoise () |
Recalculate the noise generated by the airports of each town. |
Definition in file station_func.h.
CargoArray GetAcceptanceAroundTiles | ( | TileIndex | tile, | |
int | w, | |||
int | h, | |||
int | rad, | |||
uint32 * | always_accepted | |||
) |
Get the acceptance of cargos around the tile in 1/8.
tile | Center of the search area | |
w | X extent of area | |
h | Y extent of area | |
rad | Search radius in addition to given area | |
always_accepted | bitmask of cargo accepted by houses and headquarters; can be NULL |
Definition at line 507 of file station_cmd.cpp.
References MapSizeX(), MapSizeY(), max(), min(), TileX(), TileXY(), and TileY().
Referenced by AITileList_IndustryAccepting::AITileList_IndustryAccepting(), DrawStationCoverageAreaText(), AITile::GetCargoAcceptance(), and UpdateStationAcceptance().
CargoArray GetProductionAroundTiles | ( | TileIndex | tile, | |
int | w, | |||
int | h, | |||
int | rad | |||
) |
Get the cargo types being produced around the tile (in a rectangle).
tile | Northtile of area | |
w | X extent of the area | |
h | Y extent of the area | |
rad | Search radius in addition to the given area |
Definition at line 469 of file station_cmd.cpp.
References MapSizeX(), MapSizeY(), max(), min(), TileX(), TileXY(), and TileY().
Referenced by AITileList_IndustryProducing::AITileList_IndustryProducing(), DrawStationCoverageAreaText(), and AITile::GetCargoProduction().
Tests whether the company's vehicles have this station in orders When company == INVALID_COMPANY, then check all vehicles.
station | station ID | |
company | company ID, INVALID_COMPANY to disable the check |
Definition at line 2112 of file station_cmd.cpp.
References INVALID_COMPANY.
Referenced by CompanyStationsWindow::BuildStationsList(), and RemoveBuoy().
void ShowStationViewWindow | ( | StationID | station | ) |
Opens StationViewWindow for given station.
station | station which window should be opened |
Definition at line 1142 of file station_gui.cpp.
void UpdateAllStationVirtCoords | ( | ) |
Update the virtual coords needed to draw the station sign for all stations.
Definition at line 426 of file station_cmd.cpp.
References BaseStation::UpdateVirtCoord().
Referenced by CmdRenameTown(), and UpdateAllVirtCoords().
void UpdateStationAcceptance | ( | Station * | st, | |
bool | show_msg | |||
) |
Update the acceptance for a station.
st | Station to update | |
show_msg | controls whether to display a message that acceptance was changed. |
Definition at line 541 of file station_cmd.cpp.
References Station::always_accepted, Rect::bottom, CC_PASSENGERS, CT_INVALID, FACIL_BUS_STOP, FACIL_TRUCK_STOP, BaseStation::facilities, GetAcceptanceAroundTiles(), GetAcceptanceMask(), Station::GetCatchmentRadius(), Station::goods, HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, IsCargoInClass(), StationRect::IsEmpty(), BaseStation::IsInUse(), Rect::left, lengthof, min(), NUM_CARGO, BaseStation::owner, BaseStation::rect, Rect::right, SB(), SetWindowWidgetDirty(), ShowRejectOrAcceptNews(), SVW_ACCEPTLIST, TileXY(), and Rect::top.
Referenced by CmdBuildAirport(), CmdBuildDock(), CmdBuildRailStation(), CmdBuildRoadStop(), and StationHandleBigTick().