OpenTTD Source 20241224-master-gf74b0cf984
|
Command definitions related to the economy. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdBuyCompany (DoCommandFlag flags, CompanyID target_company, bool hostile_takeover) |
Buy up another company. | |
Command definitions related to the economy.
Definition in file economy_cmd.h.
CommandCost CmdBuyCompany | ( | DoCommandFlag | flags, |
CompanyID | target_company, | ||
bool | hostile_takeover | ||
) |
Buy up another company.
When a competing company is gone bankrupt you get the chance to purchase that company.
flags | type of operation |
target_company | company to buy up |
hostile_takeover | whether to buy up the company even if it is not bankrupt |
Definition at line 2045 of file economy.cpp.
References _current_company, _local_company, _networking, CompanyProperties::bankrupt_asked, CalculateHostileTakeoverValue(), CheckTakeoverVehicleLimit(), CMD_ERROR, DC_EXEC, EXPENSES_OTHER, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, and CompanyProperties::is_ai.