OpenTTD Source 20241224-master-gf74b0cf984
|
Statically loadable part of Company pool item. More...
#include <company_base.h>
Data Fields | |
uint32_t | name_2 |
Parameter of name_1. | |
StringID | name_1 |
Name of the company if the user did not change it. | |
std::string | name |
Name of the company if the user changed it. | |
StringID | president_name_1 |
Name of the president if the user did not change it. | |
uint32_t | president_name_2 |
Parameter of president_name_1. | |
std::string | president_name |
Name of the president if the user changed it. | |
NetworkAuthorizedKeys | allow_list |
Public keys of clients that are allowed to join this company. | |
CompanyManagerFace | face |
Face description of the president. | |
Money | money |
Money owned by the company. | |
uint8_t | money_fraction |
Fraction of money of the company, too small to represent in money. | |
Money | current_loan |
Amount of money borrowed from the bank. | |
Money | max_loan |
Max allowed amount of the loan or COMPANY_MAX_LOAN_DEFAULT. | |
Colours | colour |
Company colour. | |
uint8_t | block_preview |
Number of quarters that the company is not allowed to get new exclusive engine previews (see CompaniesGenStatistics). | |
TileIndex | location_of_HQ |
Northern tile of HQ; INVALID_TILE when there is none. | |
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 to display proper 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. | |
CompanyMask | bankrupt_asked |
which companies were asked about buying it? | |
int16_t | bankrupt_timeout |
If bigger than 0 , amount of time to wait for an answer on an offer to buy this company. | |
Money | bankrupt_value |
uint32_t | terraform_limit |
Amount of tileheights we can (still) terraform (times 65536). | |
uint32_t | clear_limit |
Amount of tiles we can (still) clear (times 65536). | |
uint32_t | tree_limit |
Amount of trees we can (still) plant (times 65536). | |
uint32_t | build_object_limit |
Amount of tiles we can (still) build objects on (times 65536). Also applies to buying land. | |
bool | is_ai |
If true , the company is (also) controlled by the computer (a NoAI program). | |
std::array< Expenses, 3 > | yearly_expenses {} |
Expenses of the company for the last three years. | |
CompanyEconomyEntry | cur_economy |
Economic data of the company of this quarter. | |
CompanyEconomyEntry | old_economy [MAX_HISTORY_QUARTERS] |
Economic data of the company of the last MAX_HISTORY_QUARTERS quarters. | |
uint8_t | num_valid_stat_ent |
Number of valid statistical entries in old_economy. | |
Livery | livery [LS_END] |
EngineRenewList | engine_renew_list |
Engine renewals of this company. | |
CompanySettings | settings |
settings specific for each company | |
Statically loadable part of Company pool item.
Definition at line 69 of file company_base.h.
|
inline |
Definition at line 125 of file company_base.h.
NetworkAuthorizedKeys CompanyProperties::allow_list |
Public keys of clients that are allowed to join this company.
Definition at line 78 of file company_base.h.
Referenced by NetworkClientInfo::CanJoinCompany(), and SlAllowListData::GetVector().
CompanyMask CompanyProperties::bankrupt_asked |
which companies were asked about buying it?
Definition at line 99 of file company_base.h.
Referenced by CmdBuyCompany(), CompanyCheckBankrupt(), HandleBankruptcyTakeover(), and OnTick_Companies().
int16_t CompanyProperties::bankrupt_timeout |
If bigger than 0
, amount of time to wait for an answer on an offer to buy this company.
Definition at line 100 of file company_base.h.
Referenced by CompanyCheckBankrupt(), and HandleBankruptcyTakeover().
Money CompanyProperties::bankrupt_value |
Definition at line 101 of file company_base.h.
uint8_t CompanyProperties::block_preview |
Number of quarters that the company is not allowed to get new exclusive engine previews (see CompaniesGenStatistics).
Definition at line 89 of file company_base.h.
uint32_t CompanyProperties::build_object_limit |
Amount of tiles we can (still) build objects on (times 65536). Also applies to buying land.
Definition at line 106 of file company_base.h.
Referenced by CmdBuildObject(), and CmdBuildObjectArea().
uint32_t CompanyProperties::clear_limit |
Amount of tiles we can (still) clear (times 65536).
Definition at line 104 of file company_base.h.
Referenced by CmdClearArea(), and CmdLandscapeClear().
Colours CompanyProperties::colour |
Company colour.
Definition at line 87 of file company_base.h.
Referenced by CmdSetCompanyColour(), CompanyNewsInformation::CompanyNewsInformation(), DoStartupNewCompany(), CompanyWindow::DrawWidget(), BuyCompanyWindow::DrawWidget(), ErrmsgWindow::DrawWidget(), PLYRChunkHandler::Load(), ResetCompanyLivery(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), ServerNetworkAdminSocketHandler::SendCompanyUpdate(), and BaseGraphWindow::UpdateStatistics().
CompanyEconomyEntry CompanyProperties::cur_economy |
Economic data of the company of this quarter.
Definition at line 115 of file company_base.h.
Referenced by DeliverGoods(), and SubtractMoneyFromAnyCompany().
Money CompanyProperties::current_loan |
Amount of money borrowed from the bank.
Definition at line 84 of file company_base.h.
Referenced by CalculateCompanyValue(), CalculateHostileTakeoverValue(), CmdDecreaseLoan(), CmdGiveMoney(), CmdIncreaseLoan(), CompanyCheckBankrupt(), DoStartupNewCompany(), CompanyFinancesWindow::OnPaint(), CompanyFinancesWindow::SetStringParameters(), and UpdateCompanyRatingAndValue().
EngineRenewList CompanyProperties::engine_renew_list |
Engine renewals of this company.
Definition at line 121 of file company_base.h.
Referenced by AddEngineReplacementForCompany(), EngineHasReplacementWhenOldForCompany(), EngineReplacementForCompany(), RemoveAllEngineReplacementForCompany(), RemoveEngineReplacementForCompany(), and GroupStatistics::UpdateAutoreplace().
CompanyManagerFace CompanyProperties::face |
Face description of the president.
Definition at line 80 of file company_base.h.
Referenced by CompanyNewsInformation::CompanyNewsInformation(), DoStartupNewCompany(), CompanyWindow::DrawWidget(), BuyCompanyWindow::DrawWidget(), and ErrmsgWindow::DrawWidget().
TimerGameEconomy::Year CompanyProperties::inaugurated_year |
Economy year of starting the company.
Definition at line 94 of file company_base.h.
Referenced by DoStartupNewCompany(), and ServerNetworkAdminSocketHandler::SendCompanyInfo().
TimerGameCalendar::Year CompanyProperties::inaugurated_year_calendar |
Calendar year of starting the company. Used to display proper Inauguration year while in wallclock mode.
Definition at line 95 of file company_base.h.
Referenced by DoStartupNewCompany().
bool CompanyProperties::is_ai |
If true
, the company is (also) controlled by the computer (a NoAI program).
Definition at line 112 of file company_base.h.
Referenced by CmdBuildBridge(), CmdBuyCompany(), CmdCompanyCtrl(), GenerateCompanyName(), IndustriesScopeResolver::GetVariable(), Company::IsValidAiID(), Company::IsValidHumanID(), CompanyWindow::OnPaint(), and ServerNetworkAdminSocketHandler::SendCompanyInfo().
TileIndex CompanyProperties::last_build_coordinate |
Coordinate of the last build thing by this company.
Definition at line 92 of file company_base.h.
Referenced by GenerateCompanyName(), and CommandHelperBase::InternalExecuteProcessResult().
Livery CompanyProperties::livery[LS_END] |
Definition at line 119 of file company_base.h.
TileIndex CompanyProperties::location_of_HQ |
Northern tile of HQ; INVALID_TILE when there is none.
Definition at line 91 of file company_base.h.
Referenced by CmdBuildObject(), CompanyWindow::OnPaint(), and UpdateCompanyRatingAndValue().
Money CompanyProperties::max_loan |
Max allowed amount of the loan or COMPANY_MAX_LOAN_DEFAULT.
Definition at line 85 of file company_base.h.
Referenced by CmdSetCompanyMaxLoan(), and Company::GetMaxLoan().
Money CompanyProperties::money |
Money owned by the company.
Definition at line 82 of file company_base.h.
Referenced by CalculateCompanyValue(), CalculateHostileTakeoverValue(), CheckCompanyHasMoney(), CmdDecreaseLoan(), CmdGiveMoney(), CmdIncreaseLoan(), CompanyCheckBankrupt(), DoStartupNewCompany(), StatusBarWindow::DrawWidget(), CompanyFinancesWindow::SetStringParameters(), SubtractMoneyFromAnyCompany(), and UpdateCompanyRatingAndValue().
uint8_t CompanyProperties::money_fraction |
Fraction of money of the company, too small to represent in money.
Definition at line 83 of file company_base.h.
Referenced by SubtractMoneyFromCompanyFract().
uint8_t CompanyProperties::months_empty = 0 |
NOSAVE: Number of months this company has not had a client in multiplayer.
Definition at line 97 of file company_base.h.
Referenced by ServerNetworkGameSocketHandler::Receive_CLIENT_IDENTIFY().
uint8_t CompanyProperties::months_of_bankruptcy |
Number of months that the company is unable to pay its debts.
Definition at line 98 of file company_base.h.
Referenced by CompanyCheckBankrupt(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), and ServerNetworkAdminSocketHandler::SendCompanyUpdate().
std::string CompanyProperties::name |
Name of the company if the user changed it.
Definition at line 72 of file company_base.h.
Referenced by CmdRenameCompany(), CmdRenamePresident(), FormatString(), IsUniqueCompanyName(), and NetworkOnGameStart().
StringID CompanyProperties::name_1 |
Name of the company if the user did not change it.
Definition at line 71 of file company_base.h.
Referenced by CmdRenamePresident(), FormatString(), GenerateCompanyName(), NetworkOnGameStart(), and OnTick_Companies().
uint32_t CompanyProperties::name_2 |
Parameter of name_1.
Definition at line 70 of file company_base.h.
Referenced by FormatString(), and GenerateCompanyName().
uint8_t CompanyProperties::num_valid_stat_ent |
Number of valid statistical entries in old_economy.
Definition at line 117 of file company_base.h.
Referenced by UpdateCompanyRatingAndValue(), and BaseGraphWindow::UpdateStatistics().
CompanyEconomyEntry CompanyProperties::old_economy[MAX_HISTORY_QUARTERS] |
Economic data of the company of the last MAX_HISTORY_QUARTERS quarters.
Definition at line 116 of file company_base.h.
Referenced by CalculateHostileTakeoverValue(), PerformanceLeagueWindow::DrawWidget(), HandleBankruptcyTakeover(), HighScoreSorter(), EndGameWindow::OnPaint(), SaveHighScoreValue(), SaveHighScoreValueNetwork(), and UpdateCompanyRatingAndValue().
std::string CompanyProperties::president_name |
Name of the president if the user changed it.
Definition at line 76 of file company_base.h.
Referenced by CmdRenamePresident(), FormatString(), and IsUniquePresidentName().
StringID CompanyProperties::president_name_1 |
Name of the president if the user did not change it.
Definition at line 74 of file company_base.h.
Referenced by FormatString(), GenerateCompanyName(), and GeneratePresidentName().
uint32_t CompanyProperties::president_name_2 |
Parameter of president_name_1.
Definition at line 75 of file company_base.h.
Referenced by FormatString(), GenerateCompanyName(), and GeneratePresidentName().
CompanySettings CompanyProperties::settings |
settings specific for each company
Definition at line 122 of file company_base.h.
Referenced by AfterLoadGame(), AgeVehicle(), ChangeOwnershipOfCompanyItems(), CmdAutoreplaceVehicle(), CmdChangeServiceInt(), CmdCreateGroup(), CompanyServiceInterval(), Vehicle::NeedsAutorenewing(), Vehicle::NeedsServicing(), SetDefaultCompanySettings(), and ReplaceVehicleWindow::SetStringParameters().
uint32_t CompanyProperties::terraform_limit |
Amount of tileheights we can (still) terraform (times 65536).
Definition at line 103 of file company_base.h.
Referenced by CmdLevelLand(), and CmdTerraformLand().
uint32_t CompanyProperties::tree_limit |
Amount of trees we can (still) plant (times 65536).
Definition at line 105 of file company_base.h.
Referenced by CmdPlantTree().
std::array<Expenses, 3> CompanyProperties::yearly_expenses {} |
Expenses of the company for the last three years.
Definition at line 114 of file company_base.h.
Referenced by CompanyFinancesWindow::DrawWidget(), and SubtractMoneyFromAnyCompany().