1
0
Fork 0

Added Calendar verion of the inauguration year

pull/12769/head
Kaiden Joy 2024-06-08 17:35:49 -04:00
parent 79c1492a73
commit c737c32f5f
3 changed files with 5 additions and 3 deletions

View File

@ -92,6 +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.
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
@ -125,7 +126,7 @@ struct CompanyProperties {
: name_2(0), name_1(0), president_name_1(0), president_name_2(0),
face(0), money(0), money_fraction(0), current_loan(0), max_loan(COMPANY_MAX_LOAN_DEFAULT),
colour(COLOUR_BEGIN), block_preview(0), location_of_HQ(0), last_build_coordinate(0), inaugurated_year(0),
months_of_bankruptcy(0), bankrupt_asked(0), bankrupt_timeout(0), bankrupt_value(0),
inaugurated_year_calendar(0), months_of_bankruptcy(0), bankrupt_asked(0), bankrupt_timeout(0), bankrupt_value(0),
terraform_limit(0), clear_limit(0), tree_limit(0), build_object_limit(0), is_ai(false), engine_renew_list(nullptr) {}
};

View File

@ -608,6 +608,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
c->avail_railtypes = GetCompanyRailTypes(c->index);
c->avail_roadtypes = GetCompanyRoadTypes(c->index);
c->inaugurated_year = TimerGameEconomy::year;
c->inaugurated_year_calendar = TimerGameCalendar::year;
/* If starting a player company in singleplayer and a favorite company manager face is selected, choose it. Otherwise, use a random face.
* In a network game, we'll choose the favorite face later in CmdCompanyCtrl to sync it to all clients. */

View File

@ -2401,8 +2401,8 @@ struct CompanyWindow : Window
break;
case WID_C_DESC_INAUGURATION:
SetDParam(0, Company::Get((CompanyID)this->window_number)->inaugurated_year);
break;
SetDParam(0, Company::Get((CompanyID) this->window_number)->inaugurated_year_calendar);
break;
case WID_C_DESC_COMPANY_VALUE:
SetDParam(0, CalculateCompanyValue(Company::Get((CompanyID)this->window_number)));