diff --git a/src/lang/extra/czech.txt b/src/lang/extra/czech.txt index 2a6405b6c4..ef4a6e0848 100644 --- a/src/lang/extra/czech.txt +++ b/src/lang/extra/czech.txt @@ -1857,34 +1857,15 @@ STR_STATION_RATING_MAX_PERCENTAGE : (max. {PLUS_NU STR_STATION_RATING_MAX_PERCENTAGE_COMMA :, max. {PLUS_NUM}% STR_STATION_RATING_PERCENTAGE_COMMA :, {PLUS_NUM}% -STR_STATION_RATING_TOOLTIP_SPEED :Maximální rychlost posledního vozidla{STRING}: {STRING} ({STRING}) -STR_STATION_RATING_TOOLTIP_SPEED_ZERO :{RED}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_0 :{ORANGE}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_1 :{GOLD}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_2 :{YELLOW}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_3 :{GREEN}{VELOCITY}{STRING} - -STR_STATION_RATING_TOOLTIP_AGE :Stáří posledního vozidla{STRING}: {STRING} -STR_STATION_RATING_TOOLTIP_AGE_0 :{ORANGE}{NUM} {P rok roky let}{STRING} -STR_STATION_RATING_TOOLTIP_AGE_1 :{GOLD}{NUM} {P rok roky let}{STRING} -STR_STATION_RATING_TOOLTIP_AGE_2 :{YELLOW}{NUM} {P rok roky let}{STRING} -STR_STATION_RATING_TOOLTIP_AGE_3 :{GREEN}{NUM} {P rok roky let}{STRING} +STR_STATION_RATING_TOOLTIP_SPEED :Maximální rychlost posledního vozidla{STRING}: {SET_COLOUR}{VELOCITY}{STRING} ({STRING}) + +STR_STATION_RATING_TOOLTIP_AGE :Stáří posledního vozidla{STRING}: {SET_COLOUR}{NUM} {P rok roky let}{STRING} STR_STATION_RATING_TOOLTIP_WAITTIME :Čas od poslední obsluhy{STRING}: {STRING} STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP :Čas od poslední obsluhy{STRING}: {STRING} (lodí) -STR_STATION_RATING_TOOLTIP_WAITTIME_0 :{RED}{NUM} d{P en ny ní}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_1 :{ORANGE}{NUM} d{P en ny ní}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_2 :{GOLD}{NUM} d{P en ny ní}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_3 :{YELLOW}{NUM} d{P en ny ní}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_4 :{GREEN}{NUM} d{P en ny ní}{STRING} - -STR_STATION_RATING_TOOLTIP_WAITUNITS :Čekající náklad (v průměru na další stanici){STRING}): {STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_0 :{RED}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_1 :{ORANGE}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_2 :{GOLD}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_3 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_4 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_5 :{GREEN}{NUM}{STRING} +STR_STATION_RATING_TOOLTIP_WAITTIME_VALUE :{SET_COLOUR}{NUM} d{P en ny ní}{STRING} + +STR_STATION_RATING_TOOLTIP_WAITUNITS :Čekající náklad (v průměru na další stanici){STRING}): {SET_COLOUR}{NUM}{STRING} STR_STATION_RATING_TOOLTIP_STATUE :Socha ve městě{STRING}: {STRING} STR_STATION_RATING_TOOLTIP_STATUE_NO :{GOLD}ne{STRING} diff --git a/src/lang/extra/english.txt b/src/lang/extra/english.txt index 6f08e95136..19c46743d1 100644 --- a/src/lang/extra/english.txt +++ b/src/lang/extra/english.txt @@ -1913,34 +1913,15 @@ STR_STATION_RATING_MAX_PERCENTAGE : (max {PLUS_NUM STR_STATION_RATING_MAX_PERCENTAGE_COMMA :, max {PLUS_NUM}% STR_STATION_RATING_PERCENTAGE_COMMA :, {PLUS_NUM}% -STR_STATION_RATING_TOOLTIP_SPEED :Max speed of last vehicle{STRING1}: {STRING3} ({STRING}) -STR_STATION_RATING_TOOLTIP_SPEED_ZERO :{RED}{VELOCITY}{STRING1} -STR_STATION_RATING_TOOLTIP_SPEED_0 :{ORANGE}{VELOCITY}{STRING1} -STR_STATION_RATING_TOOLTIP_SPEED_1 :{GOLD}{VELOCITY}{STRING1} -STR_STATION_RATING_TOOLTIP_SPEED_2 :{YELLOW}{VELOCITY}{STRING1} -STR_STATION_RATING_TOOLTIP_SPEED_3 :{GREEN}{VELOCITY}{STRING1} - -STR_STATION_RATING_TOOLTIP_AGE :Age of last vehicle{STRING1}: {STRING3} -STR_STATION_RATING_TOOLTIP_AGE_0 :{ORANGE}{NUM} year{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_AGE_1 :{GOLD}{NUM} year{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_AGE_2 :{YELLOW}{NUM} year{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_AGE_3 :{GREEN}{NUM} year{P "" s}{STRING1} - -STR_STATION_RATING_TOOLTIP_WAITTIME :Time since last pickup{STRING1}: {STRING3} -STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP :Time since last pickup{STRING1}: {STRING3} (by ship) -STR_STATION_RATING_TOOLTIP_WAITTIME_0 :{RED}{NUM} day{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITTIME_1 :{ORANGE}{NUM} day{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITTIME_2 :{GOLD}{NUM} day{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITTIME_3 :{YELLOW}{NUM} day{P "" s}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITTIME_4 :{GREEN}{NUM} day{P "" s}{STRING1} - -STR_STATION_RATING_TOOLTIP_WAITUNITS :Cargo waiting (on average per next stop{STRING1}): {STRING3} -STR_STATION_RATING_TOOLTIP_WAITUNITS_0 :{RED}{NUM}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITUNITS_1 :{ORANGE}{NUM}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITUNITS_2 :{GOLD}{NUM}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITUNITS_3 :{YELLOW}{NUM}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITUNITS_4 :{YELLOW}{NUM}{STRING1} -STR_STATION_RATING_TOOLTIP_WAITUNITS_5 :{GREEN}{NUM}{STRING1} +STR_STATION_RATING_TOOLTIP_SPEED :Max speed of last vehicle{STRING1}: {SET_COLOUR}{VELOCITY}{STRING1} ({STRING}) + +STR_STATION_RATING_TOOLTIP_AGE :Age of last vehicle{STRING1}: {SET_COLOUR}{NUM} year{P "" s}{STRING1} + +STR_STATION_RATING_TOOLTIP_WAITTIME :Time since last pickup{STRING1}: {STRING4} +STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP :Time since last pickup{STRING1}: {STRING4} (by ship) +STR_STATION_RATING_TOOLTIP_WAITTIME_VALUE :{SET_COLOUR}{NUM} day{P "" s}{STRING1} + +STR_STATION_RATING_TOOLTIP_WAITUNITS :Cargo waiting (on average per next stop{STRING1}): {SET_COLOUR}{NUM}{STRING1} STR_STATION_RATING_TOOLTIP_STATUE :Statue in town{STRING1}: {STRING2} STR_STATION_RATING_TOOLTIP_STATUE_NO :{GOLD}no{STRING1} diff --git a/src/lang/extra/galician.txt b/src/lang/extra/galician.txt index 2630563150..6504426574 100644 --- a/src/lang/extra/galician.txt +++ b/src/lang/extra/galician.txt @@ -1863,34 +1863,15 @@ STR_STATION_RATING_MAX_PERCENTAGE : (máx {PLUS_NU STR_STATION_RATING_MAX_PERCENTAGE_COMMA :, máx {PLUS_NUM}% STR_STATION_RATING_PERCENTAGE_COMMA :, {PLUS_NUM}% -STR_STATION_RATING_TOOLTIP_SPEED :Velocidade máxima do último vehículo{STRING}: {STRING} ({STRING}) -STR_STATION_RATING_TOOLTIP_SPEED_ZERO :{RED}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_0 :{ORANGE}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_1 :{GOLD}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_2 :{YELLOW}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_3 :{GREEN}{VELOCITY}{STRING} - -STR_STATION_RATING_TOOLTIP_AGE :Idade do último vehículo{STRING}: {STRING} -STR_STATION_RATING_TOOLTIP_AGE_0 :{ORANGE}{NUM} ano{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_AGE_1 :{GOLD}{NUM} ano{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_AGE_2 :{YELLOW}{NUM} ano{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_AGE_3 :{GREEN}{NUM} ano{P "" s}{STRING} +STR_STATION_RATING_TOOLTIP_SPEED :Velocidade máxima do último vehículo{STRING}: {SET_COLOUR}{VELOCITY}{STRING} ({STRING}) + +STR_STATION_RATING_TOOLTIP_AGE :Idade do último vehículo{STRING}: {SET_COLOUR}{NUM} ano{P "" s}{STRING} STR_STATION_RATING_TOOLTIP_WAITTIME :Tempo dende a última recollida{STRING}: {STRING} STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP :Tempo dende a última recollida{STRING}: {STRING} (por barco) -STR_STATION_RATING_TOOLTIP_WAITTIME_0 :{RED}{NUM} día{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_1 :{ORANGE}{NUM} día{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_2 :{GOLD}{NUM} día{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_3 :{YELLOW}{NUM} día{P "" s}{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_4 :{GREEN}{NUM} día{P "" s}{STRING} - -STR_STATION_RATING_TOOLTIP_WAITUNITS :Cargamento agardando (de media por próxima parada{STRING}): {STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_0 :{RED}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_1 :{ORANGE}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_2 :{GOLD}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_3 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_4 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_5 :{GREEN}{NUM}{STRING} +STR_STATION_RATING_TOOLTIP_WAITTIME_VALUE :{SET_COLOUR}{NUM} día{P "" s}{STRING} + +STR_STATION_RATING_TOOLTIP_WAITUNITS :Cargamento agardando (de media por próxima parada{STRING}): {SET_COLOUR}{NUM}{STRING} STR_STATION_RATING_TOOLTIP_STATUE :Estatua na localidade{STRING}: {STRING} STR_STATION_RATING_TOOLTIP_STATUE_NO :{GOLD}non{STRING} diff --git a/src/lang/extra/korean.txt b/src/lang/extra/korean.txt index fda2c45c96..30769ac086 100644 --- a/src/lang/extra/korean.txt +++ b/src/lang/extra/korean.txt @@ -1864,34 +1864,15 @@ STR_STATION_RATING_MAX_PERCENTAGE : (최대 {PLUS_ STR_STATION_RATING_MAX_PERCENTAGE_COMMA :, 최대 {PLUS_NUM}% STR_STATION_RATING_PERCENTAGE_COMMA :, {PLUS_NUM}% -STR_STATION_RATING_TOOLTIP_SPEED :마지막으로 도착한 열차의 최대 속력{STRING}: {STRING} ({STRING}) -STR_STATION_RATING_TOOLTIP_SPEED_ZERO :{RED}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_0 :{ORANGE}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_1 :{GOLD}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_2 :{YELLOW}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_3 :{GREEN}{VELOCITY}{STRING} - -STR_STATION_RATING_TOOLTIP_AGE :지난 열차의 연식{STRING}: {STRING} -STR_STATION_RATING_TOOLTIP_AGE_0 :{ORANGE}{NUM}년{STRING} -STR_STATION_RATING_TOOLTIP_AGE_1 :{GOLD}{NUM}년{STRING} -STR_STATION_RATING_TOOLTIP_AGE_2 :{YELLOW}{NUM}년{STRING} -STR_STATION_RATING_TOOLTIP_AGE_3 :{GREEN}{NUM}년{STRING} +STR_STATION_RATING_TOOLTIP_SPEED :마지막으로 도착한 열차의 최대 속력{STRING}: {SET_COLOUR}{VELOCITY}{STRING} ({STRING}) + +STR_STATION_RATING_TOOLTIP_AGE :지난 열차의 연식{STRING}: {SET_COLOUR}{NUM}년{STRING} STR_STATION_RATING_TOOLTIP_WAITTIME :지난 화물 적재 이후 지난 시간{STRING}: {STRING} STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP :지난 화물 적재 이후 지난 시간{STRING}: {STRING} (선박) -STR_STATION_RATING_TOOLTIP_WAITTIME_0 :{RED}{NUM}일{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_1 :{ORANGE}{NUM}일{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_2 :{GOLD}{NUM}일{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_3 :{YELLOW}{NUM}일{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_4 :{GREEN}{NUM}일{STRING} - -STR_STATION_RATING_TOOLTIP_WAITUNITS :대기 화물량 (각 목적지별 평균치{STRING}): {STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_0 :{RED}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_1 :{ORANGE}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_2 :{GOLD}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_3 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_4 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_5 :{GREEN}{NUM}{STRING} +STR_STATION_RATING_TOOLTIP_WAITTIME_VALUE :{SET_COLOUR}{NUM}일{STRING} + +STR_STATION_RATING_TOOLTIP_WAITUNITS :대기 화물량 (각 목적지별 평균치{STRING}): {SET_COLOUR}{NUM}{STRING} STR_STATION_RATING_TOOLTIP_STATUE :도시에 회사 소유주 동상{STRING}: {STRING} STR_STATION_RATING_TOOLTIP_STATUE_NO :{GOLD}없음{STRING} diff --git a/src/lang/extra/simplified_chinese.txt b/src/lang/extra/simplified_chinese.txt index 3e503a1e9a..74480d8459 100644 --- a/src/lang/extra/simplified_chinese.txt +++ b/src/lang/extra/simplified_chinese.txt @@ -1757,34 +1757,15 @@ STR_STATION_RATING_MAX_PERCENTAGE :(max {PLUS_NU STR_STATION_RATING_MAX_PERCENTAGE_COMMA :, max {PLUS_NUM}% STR_STATION_RATING_PERCENTAGE_COMMA :, {PLUS_NUM}% -STR_STATION_RATING_TOOLTIP_SPEED :全部车辆的最高速度{STRING}:{STRING}({STRING}) -STR_STATION_RATING_TOOLTIP_SPEED_ZERO :{RED}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_0 :{ORANGE}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_1 :{GOLD}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_2 :{YELLOW}{VELOCITY}{STRING} -STR_STATION_RATING_TOOLTIP_SPEED_3 :{GREEN}{VELOCITY}{STRING} - -STR_STATION_RATING_TOOLTIP_AGE :最大车辆年限{STRING}:{STRING} -STR_STATION_RATING_TOOLTIP_AGE_0 :{ORANGE}{NUM} 年{STRING} -STR_STATION_RATING_TOOLTIP_AGE_1 :{GOLD}{NUM} 年{STRING} -STR_STATION_RATING_TOOLTIP_AGE_2 :{YELLOW}{NUM} 年{STRING} -STR_STATION_RATING_TOOLTIP_AGE_3 :{GREEN}{NUM} 年{STRING} +STR_STATION_RATING_TOOLTIP_SPEED :全部车辆的最高速度{STRING}:{SET_COLOUR}{VELOCITY}{STRING}({STRING}) + +STR_STATION_RATING_TOOLTIP_AGE :最大车辆年限{STRING}:{SET_COLOUR}{NUM} 年{STRING} STR_STATION_RATING_TOOLTIP_WAITTIME :上次结余时间距今{STRING}:{STRING} STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP :上次结余时间距今{STRING}:{STRING}(航运) -STR_STATION_RATING_TOOLTIP_WAITTIME_0 :{RED}{NUM} 天{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_1 :{ORANGE}{NUM} 天{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_2 :{GOLD}{NUM} 天{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_3 :{YELLOW}{NUM} 天{STRING} -STR_STATION_RATING_TOOLTIP_WAITTIME_4 :{GREEN}{NUM} 天{STRING} - -STR_STATION_RATING_TOOLTIP_WAITUNITS :货物等待(在平均每日等待时间{STRING}):{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_0 :{RED}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_1 :{ORANGE}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_2 :{GOLD}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_3 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_4 :{YELLOW}{NUM}{STRING} -STR_STATION_RATING_TOOLTIP_WAITUNITS_5 :{GREEN}{NUM}{STRING} +STR_STATION_RATING_TOOLTIP_WAITTIME_VALUE :{SET_COLOUR}{NUM} 天{STRING} + +STR_STATION_RATING_TOOLTIP_WAITUNITS :货物等待(在平均每日等待时间{STRING}):{SET_COLOUR}{NUM}{STRING} STR_STATION_RATING_TOOLTIP_STATUE :公司雕像{STRING}:{STRING} STR_STATION_RATING_TOOLTIP_STATUE_NO :{GOLD}否{STRING} diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 9bc75ea932..6253a727d2 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -2736,6 +2736,8 @@ int GetWaitingCargoRating(const Station *st, const GoodsEntry *ge); int GetStatueRating(const Station *st); int GetVehicleAgeRating(const GoodsEntry *ge); +static const TextColour _rate_colours[] = { TC_ORANGE, TC_GOLD, TC_YELLOW, TC_GREEN }; + struct StationRatingTooltipWindow : public Window { private: @@ -2864,13 +2866,11 @@ public: SetDParam(1, 17); if (ge->last_speed == 255) { - SetDParam(2, STR_STATION_RATING_TOOLTIP_SPEED_3); - } - else if (rounded_speed_rating == 0) { - SetDParam(2, STR_STATION_RATING_TOOLTIP_SPEED_ZERO); - } - else { - SetDParam(2, STR_STATION_RATING_TOOLTIP_SPEED_0 + std::min(3, speed_rating / 42)); + SetDParam(2, TC_GREEN); + } else if (rounded_speed_rating == 0) { + SetDParam(2, TC_RED); + } else { + SetDParam(2, _rate_colours[std::min(3, speed_rating / 42)]); } SetDParam(3, ge->last_speed); @@ -2906,24 +2906,25 @@ public: { const auto wait_time_rating = GetWaitTimeRating(cs, ge); - int wait_time_stage = 0; + TextColour wait_time_stage = TC_RED; if (wait_time_rating >= 130) { - wait_time_stage = 4; + wait_time_stage = TC_GREEN; } else if (wait_time_rating >= 95) { - wait_time_stage = 3; + wait_time_stage = TC_YELLOW; } else if (wait_time_rating >= 50) { - wait_time_stage = 2; + wait_time_stage = TC_GOLD; } else if (wait_time_rating >= 25) { - wait_time_stage = 1; + wait_time_stage = TC_ORANGE; } SetDParam(0, detailed ? STR_STATION_RATING_MAX_PERCENTAGE : STR_EMPTY); SetDParam(1, 51); - SetDParam(2, STR_STATION_RATING_TOOLTIP_WAITTIME_0 + wait_time_stage); - SetDParam(3, ge->time_since_pickup * STATION_RATING_TICKS / (DAY_TICKS * _settings_game.economy.day_length_factor)); - SetDParam(4, detailed ? STR_STATION_RATING_PERCENTAGE_COMMA : STR_EMPTY); - SetDParam(5, RoundRating(wait_time_rating)); + SetDParam(2, STR_STATION_RATING_TOOLTIP_WAITTIME_VALUE); + SetDParam(3, wait_time_stage); + SetDParam(4, ge->time_since_pickup * STATION_RATING_TICKS / (DAY_TICKS * _settings_game.economy.day_length_factor)); + SetDParam(5, detailed ? STR_STATION_RATING_PERCENTAGE_COMMA : STR_EMPTY); + SetDParam(6, RoundRating(wait_time_rating)); GetString(this->data[line_nr], (ge->last_vehicle_type == VEH_SHIP) ? STR_STATION_RATING_TOOLTIP_WAITTIME_SHIP : @@ -2938,23 +2939,21 @@ public: { const auto cargo_rating = GetWaitingCargoRating(st, ge); - int wait_units_stage = 0; + TextColour wait_units_stage = TC_RED; if (cargo_rating >= 40) { - wait_units_stage = 5; + wait_units_stage = TC_GREEN; } else if (cargo_rating >= 30) { - wait_units_stage = 4; - } else if (cargo_rating >= 10) { - wait_units_stage = 3; + wait_units_stage = TC_YELLOW; } else if (cargo_rating >= 0) { - wait_units_stage = 2; + wait_units_stage = TC_GOLD; } else if (cargo_rating >= -35) { - wait_units_stage = 1; + wait_units_stage = TC_ORANGE; } SetDParam(0, detailed ? STR_STATION_RATING_MAX_PERCENTAGE_COMMA : STR_EMPTY); SetDParam(1, 16); - SetDParam(2, STR_STATION_RATING_TOOLTIP_WAITUNITS_0 + wait_units_stage); + SetDParam(2, wait_units_stage); SetDParam(3, ge->max_waiting_cargo); SetDParam(4, detailed ? STR_STATION_RATING_PERCENTAGE_COMMA : STR_EMPTY); SetDParam(5, RoundRating(cargo_rating)); @@ -2986,19 +2985,19 @@ public: { const auto age_rating = GetVehicleAgeRating(ge); - int age_stage = 0; + TextColour age_stage = TC_ORANGE; if (age_rating >= 33) { - age_stage = 3; + age_stage = TC_GREEN; } else if (age_rating >= 20) { - age_stage = 2; + age_stage = TC_YELLOW; } else if (age_rating >= 10) { - age_stage = 1; + age_stage = TC_GOLD; } SetDParam(0, detailed ? STR_STATION_RATING_MAX_PERCENTAGE : STR_EMPTY); SetDParam(1, 13); - SetDParam(2, STR_STATION_RATING_TOOLTIP_AGE_0 + age_stage); + SetDParam(2, age_stage); SetDParam(3, ge->last_age); SetDParam(4, detailed ? STR_STATION_RATING_PERCENTAGE_COMMA : STR_EMPTY); SetDParam(5, RoundRating(age_rating));