|
OpenTTD Source
14.0-beta3
|
Go to the documentation of this file.
10 #ifndef COMPANY_FUNC_H
11 #define COMPANY_FUNC_H
25 void CompanyAdminBankrupt(
CompanyID company_id);
void UpdateCompanyLiveries(Company *c)
Update liveries for a company.
Owner
Enum for all companies/owners.
void SubtractMoneyFromCompany(const CommandCost &cost)
Subtract money from the _current_company, if the company is valid.
CompanyID _current_company
Company currently doing an action.
Colours _company_colours[MAX_COMPANIES]
NOSAVE: can be determined from company structs.
CompanyManagerFace _company_manager_face
for company manager face storage in openttd.cfg
Common return value for all commands.
void SubtractMoneyFromCompanyFract(CompanyID company, const CommandCost &cost)
Subtract money from a company, including the money fraction.
void SetLocalCompany(CompanyID new_company)
Sets the local company and updates the settings that are set on a per-company basis to reflect the co...
Money GetAvailableMoneyForCommand()
This functions returns the money which can be used to execute a command.
@ MAX_COMPANIES
Maximum number of companies.
uint32_t CompanyManagerFace
Company manager face bits, info see in company_manager_face.h.
void CompanyAdminUpdate(const Company *company)
Called whenever company related information changes in order to notify admins.
CompanyID _local_company
Company controlled by the human player at this client. Can also be COMPANY_SPECTATOR.
int CompanyServiceInterval(const Company *c, VehicleType type)
Get the service interval for the given company and vehicle type.
void ShowBuyCompanyDialog(CompanyID company, bool hostile_takeover)
Show the query to buy another company.
VehicleType
Available vehicle types.
CompanyID GetFirstPlayableCompanyID()
Get the index of the first available company.
bool MayCompanyTakeOver(CompanyID cbig, CompanyID small)
May company cbig buy company csmall?
bool CheckCompanyHasMoney(CommandCost &cost)
Verify whether the company can pay the bill.
CommandCost CheckTileOwnership(TileIndex tile)
Check whether the current owner owns the stuff on the given tile.
CommandCost CheckOwnership(Owner owner, TileIndex tile=0U)
Check whether the current owner owns something.
bool IsInteractiveCompany(CompanyID company)
Is the user representing company?
bool IsLocalCompany()
Is the current company the local company?
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
Change the ownership of all the items of a company.
static const int OWNED_BY_OWNER_IN_PARAMETERS_OFFSET
The index in the parameters for the owner information.
void UpdateLandscapingLimits()
Update the landscaping limits per company.
Money GetAvailableMoney(CompanyID company)
Get the amount of money that a company has available, or INT64_MAX if there is no such valid company.
void SetDParamsForOwnedBy(Owner owner, TileIndex tile)
Set the right DParams for STR_ERROR_OWNED_BY.