Index: src/lang/english.txt =================================================================== --- src/lang/english.txt (revision 27683) +++ src/lang/english.txt (working copy) @@ -2589,6 +2589,7 @@ 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_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 Index: src/misc_gui.cpp =================================================================== --- src/misc_gui.cpp (revision 27683) +++ src/misc_gui.cpp (working copy) @@ -162,6 +162,7 @@ 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 @@ 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); Index: src/rail_cmd.cpp =================================================================== --- src/rail_cmd.cpp (revision 27683) +++ src/rail_cmd.cpp (working copy) @@ -2720,8 +2720,8 @@ { 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; Index: src/road_cmd.cpp =================================================================== --- src/road_cmd.cpp (revision 27683) +++ src/road_cmd.cpp (working copy) @@ -1684,6 +1684,7 @@ 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; Index: src/station_cmd.cpp =================================================================== --- src/station_cmd.cpp (revision 27683) +++ src/station_cmd.cpp (working copy) @@ -2995,6 +2995,7 @@ const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(tile)); td->rail_speed = rti->max_speed; + td->railtype = rti->strings.name; } if (IsAirport(tile)) { Index: src/tile_cmd.h =================================================================== --- src/tile_cmd.h (revision 27683) +++ src/tile_cmd.h (working copy) @@ -62,6 +62,7 @@ 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) }; Index: src/tunnelbridge_cmd.cpp =================================================================== --- src/tunnelbridge_cmd.cpp (revision 27683) +++ src/tunnelbridge_cmd.cpp (working copy) @@ -1612,6 +1612,7 @@ 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;