~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/ai/api/ai_airport.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman, Matthijs Kooijman
  • Date: 2009-10-01 22:52:59 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091001225259-5kpkp4sthbszpyif
[ Matthijs Kooijman ]
* New upstream release
* Use printf instead of echo -en in openttd-wrapper to make it POSIX
  compatible (Closes: #547758).
* Remove three patches that are now included in upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: ai_airport.hpp 16272 2009-05-10 21:26:46Z rubidium $ */
 
1
/* $Id: ai_airport.hpp 17598 2009-09-21 15:41:58Z rubidium $ */
2
2
 
3
3
/** @file ai_airport.hpp Everything to query and build airports. */
4
4
 
50
50
         * Checks whether the given AirportType is valid and available.
51
51
         * @param type The AirportType to check.
52
52
         * @return True if and only if the AirportType is valid and available.
 
53
         * @post return value == true -> IsAirportInformationAvailable returns true.
53
54
         */
54
55
        static bool IsValidAirportType(AirportType type);
55
56
 
56
57
        /**
 
58
         * Can you get information on this airport type? As opposed to
 
59
         * IsValidAirportType this will return also return true when
 
60
         * an airport type is no longer buildable.
 
61
         * @param type The AirportType to check.
 
62
         * @return True if and only if the AirportType is valid.
 
63
         * @post return value == false -> IsValidAirportType returns false.
 
64
         */
 
65
        static bool IsAirportInformationAvailable(AirportType type);
 
66
 
 
67
        /**
57
68
         * Get the cost to build this AirportType.
58
69
         * @param type The AirportType to check.
 
70
         * @pre AirportAvailable(type).
59
71
         * @return The cost of building this AirportType.
60
72
         */
61
73
        static Money GetPrice(AirportType type);
79
91
        /**
80
92
         * Get the width of this type of airport.
81
93
         * @param type The type of airport.
 
94
         * @pre IsAirportInformationAvailable(type).
82
95
         * @return The width in tiles.
83
96
         */
84
97
        static int32 GetAirportWidth(AirportType type);
86
99
        /**
87
100
         * Get the height of this type of airport.
88
101
         * @param type The type of airport.
 
102
         * @pre IsAirportInformationAvailable(type).
89
103
         * @return The height in tiles.
90
104
         */
91
105
        static int32 GetAirportHeight(AirportType type);
93
107
        /**
94
108
         * Get the coverage radius of this type of airport.
95
109
         * @param type The type of airport.
 
110
         * @pre IsAirportInformationAvailable(type).
96
111
         * @return The radius in tiles.
97
112
         */
98
113
        static int32 GetAirportCoverageRadius(AirportType type);
129
144
         * @exception AIError::ERR_FLAT_LAND_REQUIRED
130
145
         * @exception AIError::ERR_LOCAL_AUTHORITY_REFUSES
131
146
         * @exception AIStation::ERR_STATION_TOO_LARGE
132
 
         * @exception AIStation::ERR_STATION_TOO_CLOSE_TO_OTHER_STATION
 
147
         * @exception AIStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION
133
148
         * @return Whether the airport has been/can be build or not.
134
149
         */
135
150
        static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id);
167
182
         *  an airport at some tile.
168
183
         * @param tile The tile to check.
169
184
         * @param type The AirportType to check.
 
185
         * @pre IsAirportInformationAvailable(type).
170
186
         * @return The TownID of the town closest to the tile.
171
187
         */
172
188
        static TownID GetNearestTown(TileIndex tile, AirportType type);