|
OpenTTD Source
13.2.1
|
Go to the source code of this file.
Functions | |
| CommandCost | CmdBuyShareInCompany (DoCommandFlag flags, CompanyID target_company) |
| Acquire shares in an opposing company. More... | |
| CommandCost | CmdSellShareInCompany (DoCommandFlag flags, CompanyID target_company) |
| Sell shares in an opposing company. More... | |
| CommandCost | CmdBuyCompany (DoCommandFlag flags, CompanyID target_company) |
| Buy up another company. More... | |
Command definitions related to the economy.
Definition in file economy_cmd.h.
| CommandCost CmdBuyCompany | ( | DoCommandFlag | flags, |
| CompanyID | target_company | ||
| ) |
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 |
Definition at line 2105 of file economy.cpp.
References _current_company, _local_company, _networking, CompanyProperties::bankrupt_asked, 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 MayCompanyTakeOver().
| CommandCost CmdBuyShareInCompany | ( | DoCommandFlag | flags, |
| CompanyID | target_company | ||
| ) |
Acquire shares in an opposing company.
| flags | type of operation |
| target_company | company to buy the shares from |
Definition at line 2023 of file economy.cpp.
References _cur_year, _current_company, _settings_game, EconomySettings::allow_shares, CMD_ERROR, GameSettings::economy, EXPENSES_OTHER, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), CompanyProperties::inaugurated_year, EconomySettings::min_years_for_shares, and return_cmd_error.
| CommandCost CmdSellShareInCompany | ( | DoCommandFlag | flags, |
| CompanyID | target_company | ||
| ) |
Sell shares in an opposing company.
| flags | type of operation |
| target_company | company to sell the shares from |
Definition at line 2068 of file economy.cpp.
References _current_company, _settings_game, EconomySettings::allow_shares, CMD_ERROR, DC_BANKRUPT, GameSettings::economy, and Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid().