OpenTTD: CompanyProperties Struct Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Data Fields
CompanyProperties Struct Reference

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

`#include <company_base.h>`

Inheritance diagram for CompanyProperties:

## Data Fields
uint32 | name_2
| Parameter of name_1.
StringID | name_1
| Name of the company if the user did not change it.
char * | 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 | president_name_2
| Parameter of president_name_1.
char * | president_name
| Name of the president if the user changed it.
CompanyManagerFace | face
| Face description of the president.
Money | money
| Money owned by the company.
byte | money_fraction
| Fraction of money of the company, too small to represent in money.
Money | current_loan
| Amount of money borrowed from the bank.
byte | colour
| Company colour.
RailTypes | avail_railtypes
| Rail types available to the company.
byte | 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.
OwnerByte | share_owners [4]
| Owners of the 4 shares of the company. INVALID_OWNER if nobody has bought them yet.
Year | inaugurated_year
| Year of starting the company.
byte | 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 | 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 | terraform_limit
| Amount of tileheights we can (still) terraform (times 65536).
uint32 | clear_limit
| Amount of tiles we can (still) clear (times 65536).
uint32 | tree_limit
| Amount of trees we can (still) plant (times 65536).
bool | is_ai
| If `true`, the company is (also) controlled by the computer (a NoAI program).
Money | yearly_expenses [3][EXPENSES_END]
| Expenses of the company for the last three years, in every #Expenses category.
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.
byte | num_valid_stat_ent
| Number of valid statistical entries in old_economy.

## Detailed Description

Statically loadable part of Company pool item.

Definition at line 53 of file company_base.h.

## Field Documentation

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 94 of file company_base.h.

Referenced by AfterLoadGame(), CmdBuildBridge(), CmdBuyShareInCompany(), CmdCompanyCtrl(), AI::GameLoop(), GenerateCompanyName(), IndustriesScopeResolver::GetVariable(), HandleBankruptcyTakeover(), Company::IsValidAiID(), Company::IsValidHumanID(), AI::KillAll(), MaybeStartNewCompany(), NetworkAutoCleanCompanies(), AIDebugWindow::OnClick(), CompanyWindow::OnInvalidateData(), CompanyWindow::OnPaint(), AIDebugWindow::SelectValidDebugCompany(), ServerNetworkAdminSocketHandler::SendCompanyInfo(), NetworkSocketHandler::SendCompanyInformation(), and ShowAIDebugWindowIfAIError().

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

- src/company_base.h