|
OpenTTD Source 20251104-master-g3befbdd52f
|
Definition of stuff that is very close to a company, like the company struct itself. More...
#include "road_type.h"#include "livery.h"#include "autoreplace_type.h"#include "tile_type.h"#include "timer/timer_game_economy.h"#include "settings_type.h"#include "group.h"Go to the source code of this file.
Data Structures | |
| struct | CompanyEconomyEntry |
| Statistics about the economy. More... | |
| struct | CompanyInfrastructure |
| class | FreeUnitIDGenerator |
| struct | CompanyProperties |
| Statically loadable part of Company pool item. More... | |
| struct | Company |
Typedefs | |
| typedef Pool< Company, CompanyID, 1 > | CompanyPool |
Functions | |
| Money | CalculateCompanyValue (const Company *c, bool including_loan=true) |
| Calculate the value of the company. | |
| Money | CalculateHostileTakeoverValue (const Company *c) |
| Calculate what you have to pay to take over a company. | |
Variables | |
| static const Money | COMPANY_MAX_LOAN_DEFAULT = INT64_MIN |
| CompanyPool | _company_pool |
| uint | _cur_company_tick_index |
| used to generate a name for one company that doesn't have a name yet per tick | |
Definition of stuff that is very close to a company, like the company struct itself.
Definition in file company_base.h.
| typedef Pool<Company, CompanyID, 1> CompanyPool |
Definition at line 67 of file company_base.h.
Calculate the value of the company.
That is the value of all assets (vehicles, stations) and money (including loan), except when including_loan is false which is useful when we want to calculate the value for bankruptcy.
| c | the company to get the value of. |
| including_loan | include the loan in the company value. |
Definition at line 150 of file economy.cpp.
References CalculateCompanyAssetValue(), CompanyProperties::current_loan, and CompanyProperties::money.
Referenced by CompanyCheckBankrupt(), CompanyWindow::GetWidgetString(), and UpdateCompanyRatingAndValue().
Calculate what you have to pay to take over a company.
This is different from bankruptcy and company value, and involves a few more parameters to make it more realistic.
You have to pay for:
And on top of that, they walk away with all the money they have in the bank.
| c | the company to get the value of. |
Definition at line 177 of file economy.cpp.
References CalculateCompanyAssetValue(), CompanyProperties::current_loan, CompanyProperties::money, and CompanyProperties::old_economy.
Referenced by CmdBuyCompany().
|
extern |
used to generate a name for one company that doesn't have a name yet per tick
Definition at line 59 of file company_cmd.cpp.
Referenced by InitializeCompanies(), and OnTick_Companies().
|
static |
Definition at line 21 of file company_base.h.