Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef STATION_FUNC_H
00013 #define STATION_FUNC_H
00014
00015 #include "sprite.h"
00016 #include "rail_type.h"
00017 #include "road_type.h"
00018 #include "vehicle_type.h"
00019 #include "economy_func.h"
00020
00021 void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius);
00022
00023 void FindStationsAroundTiles(const TileArea &location, StationList *stations);
00024
00025 void ShowStationViewWindow(StationID station);
00026 void UpdateAllStationVirtCoords();
00027
00028 CargoArray GetProductionAroundTiles(TileIndex tile, int w, int h, int rad);
00029 CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, uint32 *always_accepted = NULL);
00030
00031 void UpdateStationAcceptance(Station *st, bool show_msg);
00032
00033 const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx);
00034 void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image);
00035
00036 bool HasStationInUse(StationID station, bool include_company, CompanyID company);
00037
00038 void DeleteOilRig(TileIndex t);
00039
00040
00041 bool IsStationTileBlocked(TileIndex tile);
00042
00043
00044 bool IsStationTileElectrifiable(TileIndex tile);
00045
00046 void UpdateAirportsNoise();
00047
00048 void IncreaseStats(Station *st, const Vehicle *v, StationID next_station_id);
00049
00050 void IncreaseStats(Station *st, CargoID cargo, StationID next_station_id, uint capacity, uint usage);
00051
00052 void DeleteStaleFlows(StationID at, CargoID c_id, StationID to);
00053
00059 static inline Money StationMaintenanceCost(uint32 num)
00060 {
00061 return (_price[PR_INFRASTRUCTURE_STATION] * num * (1 + IntSqrt(num))) >> 7;
00062 }
00063
00064 Money AirportMaintenanceCost(Owner owner);
00065
00066 #endif