Functions related to companies. More...
#include "company_type.h"
#include "tile_type.h"
#include "gfx_type.h"
Go to the source code of this file.
Functions | |
bool | MayCompanyTakeOver (CompanyID cbig, CompanyID small) |
May company cbig buy company csmall? | |
void | ChangeOwnershipOfCompanyItems (Owner old_owner, Owner new_owner) |
void | GetNameOfOwner (Owner owner, TileIndex tile) |
Set the right DParams to get the name of an owner. | |
void | SetLocalCompany (CompanyID new_company) |
Sets the local company and updates the settings that are set on a per-company basis to reflect the core's state in the GUI. | |
void | ShowBuyCompanyDialog (CompanyID company) |
static bool | IsLocalCompany () |
static bool | IsInteractiveCompany (CompanyID company) |
Variables | |
CompanyByte | _local_company |
CompanyByte | _current_company |
Colours | _company_colours [MAX_COMPANIES] |
NOSAVE: can be determined from company structs. | |
CompanyManagerFace | _company_manager_face |
for company manager face storage in openttd.cfg |
Functions related to companies.
Definition in file company_func.h.
Set the right DParams to get the name of an owner.
owner | the owner to get the name of. | |
tile | optional tile to get the right town. |
Definition at line 225 of file company_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), OWNER_TOWN, and SetDParam().
Referenced by CheckOwnership(), and CheckTileOwnership().
May company cbig buy company csmall?
true
if it is allowed. Definition at line 548 of file company_cmd.cpp.
References _settings_game, CountCompanyVehicles(), VehicleSettings::max_aircraft, VehicleSettings::max_roadveh, VehicleSettings::max_ships, VehicleSettings::max_trains, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, VEH_TRAIN, and GameSettings::vehicle.
Referenced by CmdBuyCompany(), CmdBuyShareInCompany(), and HandleBankruptcyTakeover().
void SetLocalCompany | ( | CompanyID | new_company | ) |
Sets the local company and updates the settings that are set on a per-company basis to reflect the core's state in the GUI.
new_company | the new company |
Definition at line 92 of file company_cmd.cpp.
References COMPANY_SPECTATOR, DeleteConstructionWindows(), DESTTYPE_TEAM, InvalidateWindowData(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), MarkWholeScreenDirty(), and OWNER_NONE.
Referenced by ClickChangeCompanyCheat(), CmdCompanyCtrl(), GenerateWorld(), NetworkServerDoMove(), and StartScenario().