summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt1
-rw-r--r--src/misc_gui.cpp10
-rw-r--r--src/tile_cmd.h3
-rw-r--r--src/tunnelbridge_cmd.cpp2
4 files changed, 14 insertions, 2 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 3ffae4381..ee2827663 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -2547,6 +2547,7 @@ STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF:
STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Cargo accepted: {LTBLUE}
STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {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}
# Description of land area of different tiles
STR_LAI_CLEAR_DESCRIPTION_ROCKS :Rocks
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index d771f92ee..55bef30e3 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -57,7 +57,7 @@ static WindowDesc _land_info_desc(
class LandInfoWindow : public Window {
enum LandInfoLines {
- LAND_INFO_CENTERED_LINES = 12, ///< Up to 12 centered lines
+ LAND_INFO_CENTERED_LINES = 32, ///< Up to 32 centered lines (arbitrary limit)
LAND_INFO_MULTICENTER_LINE = LAND_INFO_CENTERED_LINES, ///< One multicenter line
LAND_INFO_LINE_END,
};
@@ -159,6 +159,7 @@ public:
td.airport_name = STR_NULL;
td.airport_tile_name = STR_NULL;
td.rail_speed = 0;
+ td.road_speed = 0;
td.grf = NULL;
@@ -274,6 +275,13 @@ public:
line_nr++;
}
+ /* Road speed limit */
+ if (td.road_speed != 0) {
+ SetDParam(0, td.road_speed);
+ GetString(this->landinfo_data[line_nr], STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT, lastof(this->landinfo_data[line_nr]));
+ line_nr++;
+ }
+
/* NewGRF name */
if (td.grf != NULL) {
SetDParamStr(0, td.grf);
diff --git a/src/tile_cmd.h b/src/tile_cmd.h
index 7dae7a1ca..966694bfb 100644
--- a/src/tile_cmd.h
+++ b/src/tile_cmd.h
@@ -62,7 +62,8 @@ 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
- uint16 rail_speed; ///< Speed limit of rail
+ uint16 rail_speed; ///< Speed limit of rail (bridges and track)
+ uint16 road_speed; ///< Speed limit of road (bridges)
};
/**
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index e33f8224e..2739fd7c4 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -1563,6 +1563,8 @@ static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td)
td->rail_speed = spd;
}
}
+ } else if (tt == TRANSPORT_ROAD && !IsTunnel(tile)) {
+ td->road_speed = GetBridgeSpec(GetBridgeType(tile))->speed;
}
}