@@ -2544,12 +2544,13 @@ STR_LAND_AREA_INFORMATION_AIRPORT_CLASS
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}
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
STR_LAI_CLEAR_DESCRIPTION_ROUGH_LAND :Rough land
STR_LAI_CLEAR_DESCRIPTION_BARE_LAND :Bare land
STR_LAI_CLEAR_DESCRIPTION_GRASS :Grass
@@ -54,13 +54,13 @@ static WindowDesc _land_info_desc(
0,
_nested_land_info_widgets, lengthof(_nested_land_info_widgets)
);
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,
};
static const uint LAND_INFO_LINE_BUFF_SIZE = 512;
@@ -156,12 +156,13 @@ 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;
td.road_speed = 0;
td.grf = NULL;
CargoArray acceptance;
AddAcceptedCargo(tile, acceptance, NULL);
GetTileDesc(tile, &td);
@@ -271,12 +272,19 @@ public:
if (td.rail_speed != 0) {
SetDParam(0, td.rail_speed);
GetString(this->landinfo_data[line_nr], STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT, lastof(this->landinfo_data[line_nr]));
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]));
/* NewGRF name */
if (td.grf != NULL) {
SetDParamStr(0, td.grf);
GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_NEWGRF_NAME, lastof(this->landinfo_data[line_nr]));
@@ -59,13 +59,14 @@ struct TileDesc {
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
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)
/**
* Tile callback function signature for drawing a tile and its contents to the screen
* @param ti Information about the tile to draw
*/
@@ -1560,12 +1560,14 @@ static void GetTileDesc_TunnelBridge(Til
if (!IsTunnel(tile)) {
uint16 spd = GetBridgeSpec(GetBridgeType(tile))->speed;
if (td->rail_speed == 0 || spd < td->rail_speed) {
td->rail_speed = spd;
} else if (tt == TRANSPORT_ROAD && !IsTunnel(tile)) {
td->road_speed = GetBridgeSpec(GetBridgeType(tile))->speed;
static void TileLoop_TunnelBridge(TileIndex tile)
{
Status change: