diff --git a/src/company_base.h b/src/company_base.h index 490dc85b19..5f0eb3760a 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -92,7 +92,7 @@ struct CompanyProperties { TileIndex last_build_coordinate; ///< Coordinate of the last build thing by this company. TimerGameEconomy::Year inaugurated_year; ///< Economy year of starting the company. - TimerGameCalendar::Year inaugurated_year_calendar; ///< Calendar year of starting the company. Used for when we need to display an actual Inaguration Year while in Wallclock mode. + TimerGameCalendar::Year inaugurated_year_calendar; ///< Calendar year of starting the company. Used for when we need to display an actual Inauguration Year while in Wallclock mode. uint8_t months_empty = 0; ///< NOSAVE: Number of months this company has not had a client in multiplayer. uint8_t months_of_bankruptcy; ///< Number of months that the company is unable to pay its debts diff --git a/src/company_gui.cpp b/src/company_gui.cpp index da3963e518..eb7cd358c1 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -2237,6 +2237,10 @@ struct CompanyWindow : Window } } + if (TimerGameEconomy::UsingWallclockUnits()) { + this->GetWidget(WID_C_DESC_INAUGURATION)->SetDataTip(STR_COMPANY_VIEW_INAUGURATED_TITLE_WALLCLOCK, STR_NULL); + } + this->DrawWidgets(); } @@ -2400,9 +2404,12 @@ struct CompanyWindow : Window SetDParam(1, (CompanyID)this->window_number); break; - case WID_C_DESC_INAUGURATION: - SetDParam(0, Company::Get((CompanyID) this->window_number)->inaugurated_year_calendar); - SetDParam(1, Company::Get((CompanyID) this->window_number)->inaugurated_year); + case WID_C_DESC_INAUGURATION: + if (TimerGameEconomy::UsingWallclockUnits()) { + SetDParam(0, Company::Get((CompanyID) this->window_number)->inaugurated_year_calendar); + SetDParam(1, Company::Get((CompanyID) this->window_number)->inaugurated_year); + } + else SetDParam(0, Company::Get((CompanyID) this->window_number)->inaugurated_year); break; case WID_C_DESC_COMPANY_VALUE: diff --git a/src/lang/english.txt b/src/lang/english.txt index b60b75c364..dcecf71d5e 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -3889,7 +3889,8 @@ STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastr STR_COMPANY_VIEW_CAPTION :{WHITE}{COMPANY} {BLACK}{COMPANY_NUM} STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE :{WHITE}{PRESIDENT_NAME}{}{GOLD}(Manager) -STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Inaugurated: {WHITE}{NUM} (period {NUM}) +STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Inaugurated: {WHITE}{NUM} +STR_COMPANY_VIEW_INAUGURATED_TITLE_WALLCLOCK :{GOLD}Inaugurated: {WHITE}{NUM} (period {NUM}) STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Colour Scheme: STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Vehicles: STR_COMPANY_VIEW_TRAINS :{WHITE}{COMMA} train{P "" s}