Changeset - r16013:5414ec59355b
[Not reviewed]
master
0 5 0
yexo - 14 years ago 2010-09-01 23:14:15
yexo@openttd.org
(svn r20716) -Feature: add airport class and airport name to the land info tool
5 files changed with 30 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -2164,6 +2164,8 @@ STR_LAND_AREA_INFORMATION_LANDINFO_COORD
 
STR_LAND_AREA_INFORMATION_BUILD_DATE                            :{BLACK}Built: {LTBLUE}{DATE_LONG}
 
STR_LAND_AREA_INFORMATION_STATION_CLASS                         :{BLACK}Station class: {LTBLUE}{STRING}
 
STR_LAND_AREA_INFORMATION_STATION_TYPE                          :{BLACK}Station type: {LTBLUE}{STRING}
 
STR_LAND_AREA_INFORMATION_AIRPORT_CLASS                         :{BLACK}Airport class: {LTBLUE}{STRING}
 
STR_LAND_AREA_INFORMATION_AIRPORT_NAME                          :{BLACK}Airport name: {LTBLUE}{STRING}
 
STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME                      :{BLACK}Airport tile name: {LTBLUE}{STRING}
 
STR_LAND_AREA_INFORMATION_NEWGRF_NAME                           :{BLACK}NewGRF: {LTBLUE}{RAW_STRING}
 
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED                        :{BLACK}Cargo accepted: {LTBLUE}
src/misc_gui.cpp
Show inline comments
 
@@ -149,6 +149,8 @@ public:
 

	
 
		td.station_class = STR_NULL;
 
		td.station_name = STR_NULL;
 
		td.airport_class = STR_NULL;
 
		td.airport_name = STR_NULL;
 
		td.airport_tile_name = STR_NULL;
 
		td.rail_speed = 0;
 

	
 
@@ -237,7 +239,21 @@ public:
 
			line_nr++;
 
		}
 

	
 
		/* Station type name */
 
		/* Airport class */
 
		if (td.airport_class != STR_NULL) {
 
			SetDParam(0, td.airport_class);
 
			GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_AIRPORT_CLASS, lastof(this->landinfo_data[line_nr]));
 
			line_nr++;
 
		}
 

	
 
		/* Airport name */
 
		if (td.airport_name != STR_NULL) {
 
			SetDParam(0, td.airport_name);
 
			GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_AIRPORT_NAME, lastof(this->landinfo_data[line_nr]));
 
			line_nr++;
 
		}
 

	
 
		/* Airport tile name */
 
		if (td.airport_tile_name != STR_NULL) {
 
			SetDParam(0, td.airport_tile_name);
 
			GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME, lastof(this->landinfo_data[line_nr]));
src/newgrf_airport.cpp
Show inline comments
 
@@ -207,7 +207,7 @@ static void NewAirportResolver(ResolverO
 
	res->count           = 0;
 

	
 
	const AirportSpec *as = AirportSpec::Get(airport_id);
 
	res->grffile = (as != NULL ? as->grf_prop.grffile : NULL);
 
	res->grffile         = as->grf_prop.grffile;
 
}
 

	
 
SpriteID GetCustomAirportSprite(const AirportSpec *as, byte layout)
src/station_cmd.cpp
Show inline comments
 
@@ -2805,10 +2805,17 @@ static void GetTileDesc_Station(TileInde
 
	}
 

	
 
	if (IsAirport(tile)) {
 
		const AirportSpec *as = Station::GetByTile(tile)->airport.GetSpec();
 
		td->airport_class = AirportClass::GetName(as->cls_id);
 
		td->airport_name = as->name;
 

	
 
		const AirportTileSpec *ats = AirportTileSpec::GetByTile(tile);
 
		td->airport_tile_name = ats->name;
 

	
 
		if (ats->grf_prop.grffile != NULL) {
 
		if (as->grf_prop.grffile != NULL) {
 
			const GRFConfig *gc = GetGRFConfig(as->grf_prop.grffile->grfid);
 
			td->grf = gc->GetName();
 
		} else if (ats->grf_prop.grffile != NULL) {
 
			const GRFConfig *gc = GetGRFConfig(ats->grf_prop.grffile->grfid);
 
			td->grf = gc->GetName();
 
		}
src/tile_cmd.h
Show inline comments
 
@@ -57,6 +57,8 @@ struct TileDesc {
 
	Date build_date;            ///< Date of construction of tile contents
 
	StringID station_class;     ///< Class of station
 
	StringID station_name;      ///< Type of station within the class
 
	StringID airport_class;     ///< Name of the airport class
 
	StringID airport_name;      ///< Name of the airport
 
	StringID airport_tile_name; ///< Name of the airport tile
 
	const char *grf;            ///< newGRF used for the tile contents
 
	uint64 dparam[2];           ///< Parameters of the \a str string
0 comments (0 inline, 0 general)