summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ai/api/ai_airport.cpp2
-rw-r--r--src/ai/api/ai_airport.hpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp
index c52e5abd2..ac0dd6422 100644
--- a/src/ai/api/ai_airport.cpp
+++ b/src/ai/api/ai_airport.cpp
@@ -131,7 +131,7 @@
extern uint8 GetAirportNoiseLevelForTown(const AirportSpec *as, TileIndex town_tile, TileIndex tile);
if (!::IsValidTile(tile)) return -1;
- if (!IsValidAirportType(type)) return -1;
+ if (!IsAirportInformationAvailable(type)) return -1;
if (_settings_game.economy.station_noise_level) {
const AirportSpec *as = ::AirportSpec::Get(type);
diff --git a/src/ai/api/ai_airport.hpp b/src/ai/api/ai_airport.hpp
index a058209c6..a889b3289 100644
--- a/src/ai/api/ai_airport.hpp
+++ b/src/ai/api/ai_airport.hpp
@@ -180,6 +180,7 @@ public:
* built at this tile.
* @param tile The tile to check.
* @param type The AirportType to check.
+ * @pre IsAirportInformationAvailable(type).
* @return The amount of noise added to the nearest town.
* @note The noise will be added to the town with TownID GetNearestTown(tile, type).
*/