2008-03-31 00:06:17 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2008-03-31 00:06:17 +00:00
|
|
|
/** @file station_func.h Functions related to stations. */
|
|
|
|
|
|
|
|
#ifndef STATION_FUNC_H
|
|
|
|
#define STATION_FUNC_H
|
|
|
|
|
|
|
|
#include "station_type.h"
|
|
|
|
#include "sprite.h"
|
2008-03-31 06:42:26 +00:00
|
|
|
#include "rail_type.h"
|
2008-03-31 00:06:17 +00:00
|
|
|
#include "road_type.h"
|
|
|
|
#include "cargo_type.h"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "company_type.h"
|
2008-03-31 00:06:17 +00:00
|
|
|
|
2008-09-30 20:39:50 +00:00
|
|
|
void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
2010-01-04 18:16:32 +00:00
|
|
|
void FindStationsAroundTiles(const TileArea &location, StationList *stations);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
|
|
|
void ShowStationViewWindow(StationID station);
|
2009-07-13 22:33:25 +00:00
|
|
|
void UpdateAllStationVirtCoords();
|
2008-03-31 00:06:17 +00:00
|
|
|
|
2009-06-27 21:06:58 +00:00
|
|
|
CargoArray GetProductionAroundTiles(TileIndex tile, int w, int h, int rad);
|
2009-09-20 17:44:33 +00:00
|
|
|
CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, uint32 *always_accepted = NULL);
|
2009-09-07 07:39:08 +00:00
|
|
|
|
|
|
|
void UpdateStationAcceptance(Station *st, bool show_msg);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
|
|
|
const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx);
|
|
|
|
void StationPickerDrawSprite(int x, int y, StationType st, RailType railtype, RoadType roadtype, int image);
|
|
|
|
|
2010-08-20 12:50:59 +00:00
|
|
|
bool HasStationInUse(StationID station, bool include_company, CompanyID company);
|
2008-03-31 00:06:17 +00:00
|
|
|
|
|
|
|
void DeleteOilRig(TileIndex t);
|
|
|
|
|
2008-03-31 06:42:26 +00:00
|
|
|
/* Check if a rail station tile is traversable. */
|
|
|
|
bool IsStationTileBlocked(TileIndex tile);
|
|
|
|
|
|
|
|
/* Check if a rail station tile is electrifiable. */
|
|
|
|
bool IsStationTileElectrifiable(TileIndex tile);
|
|
|
|
|
2008-05-24 02:54:47 +00:00
|
|
|
void UpdateAirportsNoise();
|
2008-03-31 06:42:26 +00:00
|
|
|
|
2008-03-31 00:06:17 +00:00
|
|
|
#endif /* STATION_FUNC_H */
|