Mercurial > hg > openttd
changeset 18605:2e1ac7ba24b3 draft
(svn r23452) -Codechange: document instead of writing to stderr that ScriptStation::GetCoverageRadius doesn't work for STATION_AIRPORT
author | yexo <yexo@openttd.org> |
---|---|
date | Thu, 08 Dec 2011 23:28:02 +0000 |
parents | d6ed85006d4a |
children | 61e476428939 |
files | src/script/api/script_station.cpp src/script/api/script_station.hpp |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- a/src/script/api/script_station.hpp +++ b/src/script/api/script_station.hpp @@ -89,7 +89,9 @@ /** * 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);