OpenTTD Source  20241108-master-g80f628063a
CompanyProperties Struct Reference

Statically loadable part of Company pool item. More...

#include <company_base.h>

Inheritance diagram for CompanyProperties:
Company

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). More...
 
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
 

Detailed Description

Statically loadable part of Company pool item.

Definition at line 69 of file company_base.h.

Field Documentation

◆ is_ai

bool CompanyProperties::is_ai

If true, the company is (also) controlled by the computer (a NoAI program).

Note
It is possible that the user is also participating in such a company.

Definition at line 112 of file company_base.h.

Referenced by CmdBuyCompany(), Company::IsValidAiID(), Company::IsValidHumanID(), CompanyWindow::OnPaint(), and ServerNetworkAdminSocketHandler::SendCompanyInfo().


The documentation for this struct was generated from the following file: