Changeset - r22479:b6106f114b30
[Not reviewed]
master
0 7 0
frosch - 8 years ago 2016-12-09 21:27:22
frosch@openttd.org
(svn r27686) -Change: List railtype of rail tiles explicitly in the tile info window.
7 files changed with 37 insertions and 24 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -2589,6 +2589,7 @@ STR_LAND_AREA_INFORMATION_AIRPORTTILE_NA
 
STR_LAND_AREA_INFORMATION_NEWGRF_NAME                           :{BLACK}NewGRF: {LTBLUE}{RAW_STRING}
 
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED                        :{BLACK}Cargo accepted: {LTBLUE}
 
STR_LAND_AREA_INFORMATION_CARGO_EIGHTS                          :({COMMA}/8 {STRING})
 
STR_LANG_AREA_INFORMATION_RAIL_TYPE                             :{BLACK}Rail type: {LTBLUE}{STRING}
 
STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT                      :{BLACK}Rail speed limit: {LTBLUE}{VELOCITY}
 
STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT                      :{BLACK}Road speed limit: {LTBLUE}{VELOCITY}
 

	
 
@@ -2601,29 +2602,29 @@ STR_LAI_CLEAR_DESCRIPTION_FIELDS        
 
STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND                     :Snow-covered land
 
STR_LAI_CLEAR_DESCRIPTION_DESERT                                :Desert
 

	
 
STR_LAI_RAIL_DESCRIPTION_TRACK                                  :{STRING} track
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS              :{STRING} track with block signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS                  :{STRING} track with pre-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS                 :{STRING} track with exit-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS                :{STRING} track with combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS                  :{STRING} track with path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS              :{STRING} track with one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS           :{STRING} track with block and pre-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS          :{STRING} track with block and exit-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS         :{STRING} track with block and combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS           :{STRING} track with block and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS       :{STRING} track with block and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS             :{STRING} track with pre- and exit-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS            :{STRING} track with pre- and combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS              :{STRING} track with pre- and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS          :{STRING} track with pre- and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS           :{STRING} track with exit- and combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS             :{STRING} track with exit- and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS         :{STRING} track with exit- and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS            :{STRING} track with combo- and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS        :{STRING} track with combo- and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS          :{STRING} track with path and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT                            :{STRING} train depot
 
STR_LAI_RAIL_DESCRIPTION_TRACK                                  :Railway track
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS              :Railway track with block signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS                  :Railway track with pre-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS                 :Railway track with exit-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS                :Railway track with combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS                  :Railway track with path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS              :Railway track with one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS           :Railway track with block and pre-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS          :Railway track with block and exit-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS         :Railway track with block and combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS           :Railway track with block and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS       :Railway track with block and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS             :Railway track with pre- and exit-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS            :Railway track with pre- and combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS              :Railway track with pre- and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS          :Railway track with pre- and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS           :Railway track with exit- and combo-signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS             :Railway track with exit- and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS         :Railway track with exit- and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS            :Railway track with combo- and path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS        :Railway track with combo- and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS          :Railway track with path and one-way path signals
 
STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT                            :Railway train depot
 

	
 
STR_LAI_ROAD_DESCRIPTION_ROAD                                   :Road
 
STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS                 :Road with street lights
src/misc_gui.cpp
Show inline comments
 
@@ -162,6 +162,7 @@ public:
 
		td.airport_class = STR_NULL;
 
		td.airport_name = STR_NULL;
 
		td.airport_tile_name = STR_NULL;
 
		td.railtype = STR_NULL;
 
		td.rail_speed = 0;
 
		td.road_speed = 0;
 

	
 
@@ -272,6 +273,13 @@ public:
 
			line_nr++;
 
		}
 

	
 
		/* Rail type name */
 
		if (td.railtype != STR_NULL) {
 
			SetDParam(0, td.railtype);
 
			GetString(this->landinfo_data[line_nr], STR_LANG_AREA_INFORMATION_RAIL_TYPE, lastof(this->landinfo_data[line_nr]));
 
			line_nr++;
 
		}
 

	
 
		/* Rail speed limit */
 
		if (td.rail_speed != 0) {
 
			SetDParam(0, td.rail_speed);
src/rail_cmd.cpp
Show inline comments
 
@@ -2720,8 +2720,8 @@ static void GetTileDesc_Track(TileIndex 
 
{
 
	const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
 
	td->rail_speed = rti->max_speed;
 
	td->railtype = rti->strings.name;
 
	td->owner[0] = GetTileOwner(tile);
 
	SetDParamX(td->dparam, 0, rti->strings.name);
 
	switch (GetRailTileType(tile)) {
 
		case RAIL_TILE_NORMAL:
 
			td->str = STR_LAI_RAIL_DESCRIPTION_TRACK;
src/road_cmd.cpp
Show inline comments
 
@@ -1684,6 +1684,7 @@ static void GetTileDesc_Road(TileIndex t
 
			if (HasBit(rts, ROADTYPE_TRAM)) tram_owner = GetRoadOwner(tile, ROADTYPE_TRAM);
 

	
 
			const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
 
			td->railtype = rti->strings.name;
 
			td->rail_speed = rti->max_speed;
 

	
 
			break;
src/station_cmd.cpp
Show inline comments
 
@@ -2995,6 +2995,7 @@ static void GetTileDesc_Station(TileInde
 

	
 
		const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
 
		td->rail_speed = rti->max_speed;
 
		td->railtype = rti->strings.name;
 
	}
 

	
 
	if (IsAirport(tile)) {
src/tile_cmd.h
Show inline comments
 
@@ -62,6 +62,7 @@ struct TileDesc {
 
	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
 
	StringID railtype;          ///< Type of rail on the tile.
 
	uint16 rail_speed;          ///< Speed limit of rail (bridges and track)
 
	uint16 road_speed;          ///< Speed limit of road (bridges)
 
};
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1612,6 +1612,7 @@ static void GetTileDesc_TunnelBridge(Til
 
	if (tt == TRANSPORT_RAIL) {
 
		const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
 
		td->rail_speed = rti->max_speed;
 
		td->railtype = rti->strings.name;
 

	
 
		if (!IsTunnel(tile)) {
 
			uint16 spd = GetBridgeSpec(GetBridgeType(tile))->speed;
0 comments (0 inline, 0 general)