summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-12-08 23:28:02 +0000
committeryexo <yexo@openttd.org>2011-12-08 23:28:02 +0000
commitca57514b9fec50024e684e52359576c1e7c70a33 (patch)
tree5c995e19a2d7f1a72ca859084fe104b72bc97050 /src/script
parentccededbf7785d966be7c6c71a995ec9a44be927b (diff)
downloadopenttd-ca57514b9fec50024e684e52359576c1e7c70a33.tar.xz
(svn r23452) -Codechange: document instead of writing to stderr that ScriptStation::GetCoverageRadius doesn't work for STATION_AIRPORT
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_station.cpp6
-rw-r--r--src/script/api/script_station.hpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/script/api/script_station.cpp b/src/script/api/script_station.cpp
index c4fd8274f..f91a1d2e7 100644
--- a/src/script/api/script_station.cpp
+++ b/src/script/api/script_station.cpp
@@ -50,11 +50,9 @@
/* static */ int32 ScriptStation::GetCoverageRadius(ScriptStation::StationType station_type)
{
- if (station_type == STATION_AIRPORT) {
- DEBUG(script, 0, "GetCoverageRadius(): coverage radius of airports needs to be requested via ScriptAirport::GetAirportCoverageRadius(), as it requires AirportType");
- return -1;
- }
+ if (station_type == STATION_AIRPORT) return -1;
if (!HasExactlyOneBit(station_type)) return -1;
+
if (!_settings_game.station.modified_catchment) return CA_UNMODIFIED;
switch (station_type) {
diff --git a/src/script/api/script_station.hpp b/src/script/api/script_station.hpp
index 29896681c..1c0dcd975 100644
--- a/src/script/api/script_station.hpp
+++ b/src/script/api/script_station.hpp
@@ -89,7 +89,9 @@ public:
/**
* Get the coverage radius of this type of station.
* @param station_type The type of station.
+ * @pre station_type != STATION_AIRPORT.
* @return The radius in tiles.
+ * @note Coverage radius of airports needs to be requested via ScriptAirport::GetAirportCoverageRadius(), as it requires AirportType.
*/
static int32 GetCoverageRadius(ScriptStation::StationType station_type);