Changeset - r18595:77f16a6b4e68
[Not reviewed]
master
0 2 0
yexo - 12 years ago 2011-12-08 23:28:02
yexo@openttd.org
(svn r23452) -Codechange: document instead of writing to stderr that ScriptStation::GetCoverageRadius doesn't work for STATION_AIRPORT
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/script/api/script_station.cpp
Show inline comments
 
@@ -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) {
src/script/api/script_station.hpp
Show inline comments
 
@@ -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);
 

	
0 comments (0 inline, 0 general)