OpenTTD Source 20250312-master-gcdcc6b491d
|
Functions related to companies. More...
Go to the source code of this file.
Functions | |
bool | CheckTakeoverVehicleLimit (CompanyID cbig, CompanyID small) |
Can company cbig buy company csmall without exceeding vehicle limits? | |
void | ChangeOwnershipOfCompanyItems (Owner old_owner, Owner new_owner) |
Change the ownership of all the items of a company. | |
std::array< StringParameter, 2 > | GetParamsForOwnedBy (Owner owner, TileIndex tile) |
Set the right DParams for STR_ERROR_OWNED_BY. | |
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, bool hostile_takeover) |
Show the query to buy another company. | |
void | CompanyAdminUpdate (const Company *company) |
Called whenever company related information changes in order to notify admins. | |
void | CompanyAdminBankrupt (CompanyID company_id) |
void | UpdateLandscapingLimits () |
Update the landscaping limits per company. | |
void | UpdateCompanyLiveries (Company *c) |
Update liveries for a 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. | |
Money | GetAvailableMoneyForCommand () |
This functions returns the money which can be used to execute a command. | |
bool | CheckCompanyHasMoney (CommandCost &cost) |
Verify whether the company can pay the bill. | |
void | SubtractMoneyFromCompany (const CommandCost &cost) |
Subtract money from the _current_company, if the company is valid. | |
void | SubtractMoneyFromCompanyFract (CompanyID company, const CommandCost &cost) |
Subtract money from a company, including the money fraction. | |
CommandCost | CheckOwnership (Owner owner, TileIndex tile={}) |
Check whether the current owner owns something. | |
CommandCost | CheckTileOwnership (TileIndex tile) |
Check whether the current owner owns the stuff on the given tile. | |
bool | IsLocalCompany () |
Is the current company the local company? | |
bool | IsInteractiveCompany (CompanyID company) |
Is the user representing company? | |
int | CompanyServiceInterval (const Company *c, VehicleType type) |
Get the service interval for the given company and vehicle type. | |
CompanyID | GetFirstPlayableCompanyID () |
Get the index of the first available company. | |
Variables | |
CompanyID | _local_company |
Company controlled by the human player at this client. Can also be COMPANY_SPECTATOR. | |
CompanyID | _current_company |
Company currently doing an action. | |
ReferenceThroughBaseContainer< std::array< Colours, MAX_COMPANIES > > | _company_colours |
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.
Change the ownership of all the items of a company.
old_owner | The company that gets removed. |
new_owner | The company to merge to, or INVALID_OWNER to remove the company. |
Definition at line 322 of file economy.cpp.
References _current_company, _local_company, _networking, AddTrackToSignalBuffer(), Bankrupt, ChangeTileOwner(), ChangeWindowOwner(), ClearCargoDeliveryMonitoring(), ClearCargoPickupMonitoring(), CompanyServiceInterval(), GroupStatistics::CountEngine(), GroupStatistics::CountVehicle(), Execute, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), GetTrackBits(), HasSignalOnTrack(), HasSignals(), INVALID_OWNER, IsCompanyBuildableVehicleType(), IsLevelCrossingTile(), IsTileOwner(), IsTileType(), Map::Iterate(), SpecializedStation< Station, false >::Iterate(), SpecializedStation< Waypoint, true >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_subsidy_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_story_page_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_sign_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_group_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_goal_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Iterate(), MarkWholeScreenDirty(), MP_RAILWAY, NetworkClientsToSpectators(), FreeUnitIDGenerator::NextID(), OWNER_NONE, RATING_INITIAL, RebuildSubsidisedSourceAndDestinationCache(), RemoveAllEngineReplacementForCompany(), RemoveFirstTrack(), Backup< T >::Restore(), VehicleDefaultSettings::servint_aircraft, VehicleDefaultSettings::servint_ispercent, VehicleDefaultSettings::servint_roadveh, VehicleDefaultSettings::servint_ships, VehicleDefaultSettings::servint_trains, SetLocalCompany(), CompanyProperties::settings, TRACK_BIT_NONE, GroupStatistics::UpdateAutoreplace(), UpdateLevelCrossing(), UpdateSignalsInBuffer(), FreeUnitIDGenerator::UseID(), and CompanySettings::vehicle.
Referenced by CmdCompanyCtrl(), and ResetLandscapeConfirmationCallback().
bool CheckCompanyHasMoney | ( | CommandCost & | cost | ) |
Verify whether the company can pay the bill.
[in,out] | cost | Money to pay, is changed to an error if the company does not have enough money. |
true
if the company has enough money or infinite money is enabled, else it returns false
. Definition at line 240 of file company_cmd.cpp.
References _current_company, _settings_game, GameSettings::difficulty, CommandCost::GetCost(), GetEncodedString(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::GetIfValid(), DifficultySettings::infinite_money, IsLocalCompany(), CommandCost::MakeError(), CompanyProperties::money, and CommandCost::SetEncodedMessage().
Referenced by CmdCloneVehicle(), CommandHelperBase::InternalDoAfter(), and CommandHelperBase::InternalExecuteValidateTestAndPrepExec().
CommandCost CheckOwnership | ( | Owner | owner, |
TileIndex | tile | ||
) |
Check whether the current owner owns something.
If that isn't the case an appropriate error will be given.
owner | the owner of the thing to check. |
tile | optional tile to get the right town. |
Definition at line 358 of file company_cmd.cpp.
References _current_company, GetEncodedStringWithArgs(), GetParamsForOwnedBy(), IsLocalCompany(), OWNER_END, and OWNER_TOWN.
Referenced by CanRemoveRoadWithStop(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckFlatLandRoadStop(), CheckTileOwnership(), CmdAutofillTimetable(), CmdAutoreplaceVehicle(), CmdBuildObject(), CmdBuildRoad(), CmdBuildSingleRail(), CmdBulkChangeTimetable(), CmdChangeServiceInt(), CmdChangeTimetable(), CmdCloneOrder(), CmdCloneVehicle(), CmdConvertRoad(), CmdDeleteOrder(), CmdForceTrainProceed(), CmdInsertOrder(), CmdModifyOrder(), CmdMoveOrder(), CmdMoveRailVehicle(), CmdOpenCloseAirport(), CmdOrderRefit(), CmdRefitVehicle(), CmdRenameStation(), CmdRenameVehicle(), CmdRenameWaypoint(), CmdReverseTrainDirection(), CmdSellVehicle(), CmdSetTimetableStart(), CmdSetVehicleOnTime(), CmdSkipToOrder(), CmdStartStopVehicle(), CmdTurnRoadVeh(), IsValidTileForWaypoint(), RemoveAirport(), RemoveDock(), RemoveFromRailBaseStation(), RemoveRailStation(), RemoveRoadStop(), RemoveRoadWaypointStop(), and Vehicle::SendToDepot().
Can company cbig buy company csmall without exceeding vehicle limits?
true
if it is allowed. Definition at line 667 of file company_cmd.cpp.
References _settings_game, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), Company::group_all, 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(), and HandleBankruptcyTakeover().
CommandCost CheckTileOwnership | ( | TileIndex | tile | ) |
Check whether the current owner owns the stuff on the given tile.
If that isn't the case an appropriate error will be given.
tile | the tile to check. |
Definition at line 381 of file company_cmd.cpp.
References CheckOwnership(), and GetTileOwner().
Referenced by CheckAllowRemoveTunnelBridge(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildSingleRail(), CmdBuildSingleSignal(), CmdBuildTrainDepot(), CmdConvertRail(), CmdRemoveSingleRail(), CmdRemoveSingleSignal(), CmdRenameDepot(), and RemoveLock().
void CompanyAdminUpdate | ( | const Company * | company | ) |
Called whenever company related information changes in order to notify admins.
company | The company data changed of. |
Definition at line 830 of file company_cmd.cpp.
References _network_server, and NetworkAdminCompanyUpdate().
Referenced by CmdRenameCompany(), CmdRenamePresident(), CmdSetCompanyColour(), and CompanyCheckBankrupt().
int CompanyServiceInterval | ( | const Company * | c, |
VehicleType | type | ||
) |
Get the service interval for the given company and vehicle type.
c | The company, or nullptr for client-default settings. |
type | The vehicle type to get the interval for. |
Definition at line 1242 of file company_cmd.cpp.
References _settings_client, ClientSettings::company, VehicleDefaultSettings::servint_aircraft, VehicleDefaultSettings::servint_roadveh, VehicleDefaultSettings::servint_ships, VehicleDefaultSettings::servint_trains, CompanyProperties::settings, VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, VEH_TRAIN, and CompanySettings::vehicle.
Referenced by ChangeOwnershipOfCompanyItems(), CmdChangeServiceInt(), and UpdateAllServiceInterval().
Get the amount of money that a company has available, or INT64_MAX if there is no such valid company.
company | Company to check |
Definition at line 215 of file company_cmd.cpp.
References _settings_game, GameSettings::difficulty, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), DifficultySettings::infinite_money, and Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID().
Referenced by CompaniesPayInterest(), TownAuthorityWindow::DrawWidget(), GetAvailableMoneyForCommand(), GetMaskOfTownActions(), and Vehicle::NeedsServicing().
Money GetAvailableMoneyForCommand | ( | ) |
This functions returns the money which can be used to execute a command.
This is either the money of the current company, or INT64_MAX if infinite money is enabled or there is no such a company "at the moment" like the server itself.
Definition at line 229 of file company_cmd.cpp.
References _current_company, and GetAvailableMoney().
Referenced by CmdBuildObjectArea(), CmdClearArea(), CmdDecreaseLoan(), CmdFoundTown(), CmdLevelLand(), and CmdRemoveLongRoad().
CompanyID GetFirstPlayableCompanyID | ( | ) |
Get the index of the first available company.
It attempts, from first to last, and as soon as the attempt succeeds, to get the index of the company: 1st - get the first existing human company. 2nd - get the first non-existing company. 3rd - get CompanyID::Begin().
Definition at line 1328 of file company_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::CanAllocateItem(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Company::IsHumanID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), and Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Iterate().
Referenced by AfterLoadGame(), NetworkOnGameStart(), and OnStartGame().
std::array< StringParameter, 2 > GetParamsForOwnedBy | ( | Owner | owner, |
TileIndex | tile | ||
) |
Set the right DParams for STR_ERROR_OWNED_BY.
owner | the owner to get the name of. |
tile | optional tile to get the right town. |
Definition at line 335 of file company_cmd.cpp.
References ClosestTownFromTile(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), and OWNER_TOWN.
Referenced by CheckOwnership(), CmdConvertRoad(), and LandInfoWindow::OnInit().
|
inline |
Is the user representing company?
company | Company where interaction is needed with. |
true
if the user can answer questions interactively as representative of company, else false
Definition at line 56 of file company_func.h.
References _local_company.
Referenced by HandleBankruptcyTakeover().
|
inline |
Is the current company the local company?
true
of the current company is the local company, false
otherwise. Definition at line 46 of file company_func.h.
References _current_company, and _local_company.
Referenced by BuildReplacementVehicle(), CheckCompanyHasMoney(), CheckOwnership(), CmdBuildIndustry(), CmdBuildVehicle(), CmdConvertRoad(), CmdSetAutoReplace(), CommandCostWithParam(), GetErrorMessageFromLocationCallbackResult(), HandleKeypress(), HandleMouseEvents(), HandleToolbarHotkey(), InputLoop(), CommandHelperBase::InternalPostBefore(), CommandHelperBase::InternalPostResult(), SetLocalCompany(), StateGameLoop(), and TownActionBribe().
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 116 of file company_cmd.cpp.
References _current_company, _local_company, CloseConstructionWindows(), COMPANY_SPECTATOR, DESTTYPE_TEAM, InvalidateWindowClassesData(), InvalidateWindowData(), IsLocalCompany(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), MarkWholeScreenDirty(), OWNER_NONE, WC_COMPANY, WC_GOALS_LIST, WC_SEND_NETWORK_MSG, and WC_SIGN_LIST.
Referenced by ChangeOwnershipOfCompanyItems(), ClickChangeCompanyCheat(), CmdCompanyCtrl(), GenerateWorld(), LoadIntroGame(), NetworkClientsToSpectators(), NetworkServerDoMove(), OnStartGame(), ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(), and ClientNetworkGameSocketHandler::Receive_SERVER_MOVE().
void ShowBuyCompanyDialog | ( | CompanyID | company, |
bool | hostile_takeover | ||
) |
Show the query to buy another company.
company | The company to buy. |
hostile_takeover | Whether this is a hostile takeover. |
Definition at line 2689 of file company_gui.cpp.
References BringWindowToFrontById(), and WC_BUY_COMPANY.
Referenced by HandleBankruptcyTakeover(), and CompanyWindow::OnClick().
void SubtractMoneyFromCompany | ( | const CommandCost & | cost | ) |
Subtract money from the _current_company, if the company is valid.
cost | Money to pay. |
Definition at line 290 of file company_cmd.cpp.
References _current_company, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::GetIfValid(), and SubtractMoneyFromAnyCompany().
Referenced by CmdChangeBankBalance(), CmdGiveMoney(), CompaniesGenStatistics(), CompaniesPayInterest(), CommandHelperBase::InternalDoAfter(), and CommandHelperBase::InternalExecuteProcessResult().
void SubtractMoneyFromCompanyFract | ( | CompanyID | company, |
const CommandCost & | cst | ||
) |
Subtract money from a company, including the money fraction.
company | Company paying the bill. |
cst | Cost of a command. |
Definition at line 301 of file company_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), CommandCost::GetCost(), CommandCost::GetExpensesType(), CompanyProperties::money_fraction, and SubtractMoneyFromAnyCompany().
Referenced by Aircraft::OnNewEconomyDay(), RoadVehicle::OnNewEconomyDay(), Ship::OnNewEconomyDay(), and Train::OnNewEconomyDay().
void UpdateCompanyLiveries | ( | Company * | c | ) |
Update liveries for a company.
This is called when the LS_DEFAULT scheme is changed, to update schemes with colours set to default.
c | Company to update. |
Definition at line 1039 of file company_cmd.cpp.
References HasBit(), and UpdateCompanyGroupLiveries().
Referenced by AfterLoadGame(), and CmdSetCompanyColour().
void UpdateLandscapingLimits | ( | ) |
Update the landscaping limits per company.
Definition at line 319 of file company_cmd.cpp.
References _settings_game, ConstructionSettings::build_object_frame_burst, ConstructionSettings::build_object_per_64k_frames, ConstructionSettings::clear_frame_burst, ConstructionSettings::clear_per_64k_frames, GameSettings::construction, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Iterate(), ConstructionSettings::terraform_frame_burst, ConstructionSettings::terraform_per_64k_frames, ConstructionSettings::tree_frame_burst, and ConstructionSettings::tree_per_64k_frames.
Referenced by StateGameLoop().
|
extern |
NOSAVE: can be determined from company structs.
Definition at line 54 of file company_cmd.cpp.
Referenced by CmdSetCompanyColour(), DoStartupNewCompany(), DrawCaption(), GetDrawStringCompanyColour(), PLYRChunkHandler::Load(), ViewportAddSignStrings(), and ViewportAddStationStrings().
|
extern |
for company manager face storage in openttd.cfg
Definition at line 55 of file company_cmd.cpp.
Referenced by CmdCompanyCtrl(), DoStartupNewCompany(), and SelectCompanyManagerFaceWindow::OnClick().
|
extern |
Company currently doing an action.
Definition at line 53 of file company_cmd.cpp.
Referenced by _GenerateWorld(), Station::AddFacility(), AfterLoadGame(), AutoslopeEnabled(), BuildReplacementVehicle(), BuildStationPart(), CanBuildTramTrackOnTile(), CanRemoveRoadWithStop(), CcAI(), CcCreateGroup(), ChangeOwnershipOfCompanyItems(), ChangeTownRating(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckClearTile(), CheckCompanyHasMoney(), CheckforTownRating(), CheckIfAuthorityAllowsNewStation(), CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckOwnership(), ClearTile_Town(), CmdAddSharedVehicleGroup(), CmdAddVehicleGroup(), CmdAlterGroup(), CmdAutoreplaceVehicle(), CmdBuildAircraft(), CmdBuildBridge(), CmdBuildCanal(), CmdBuildDock(), CmdBuildIndustry(), CmdBuildObject(), CmdBuildObjectArea(), CmdBuildRailStation(), CmdBuildRailVehicle(), CmdBuildRailWagon(), CmdBuildRailWaypoint(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildRoadStop(), CmdBuildRoadVehicle(), CmdBuildRoadWaypoint(), CmdBuildShip(), CmdBuildShipDepot(), CmdBuildSingleRail(), CmdBuildSingleSignal(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdBuildVehicle(), CmdBuyCompany(), CmdChangeBankBalance(), CmdChangeCompanySetting(), CmdClearArea(), CmdCompanyAllowListCtrl(), CmdConvertRoad(), CmdCreateGoal(), CmdCreateGroup(), CmdCreateLeagueTable(), CmdCreateLeagueTableElement(), CmdCreateStoryPage(), CmdCreateStoryPageElement(), CmdCreateSubsidy(), CmdCustomNewsItem(), CmdDecreaseLoan(), CmdDeleteGroup(), CmdDepotMassAutoReplace(), CmdDepotSellAllVehicles(), CmdDoTownAction(), CmdEngineCtrl(), CmdExpandTown(), CmdFoundTown(), CmdGiveMoney(), CmdGoalQuestion(), CmdGoalQuestionAnswer(), CmdIncreaseLoan(), CmdIndustrySetExclusivity(), CmdIndustrySetFlags(), CmdIndustrySetProduction(), CmdIndustrySetText(), CmdLandscapeClear(), CmdLevelLand(), CmdMassStartStopVehicle(), CmdMoveRailVehicle(), CmdPlaceSign(), CmdPlantTree(), CmdRemoveAllVehiclesGroup(), CmdRemoveGoal(), CmdRemoveLeagueTableElement(), CmdRemoveSingleRail(), CmdRemoveSingleSignal(), CmdRemoveStoryPage(), CmdRemoveStoryPageElement(), CmdRenameCompany(), CmdRenamePresident(), CmdRenameSign(), CmdScrollViewport(), CmdSetAutoReplace(), CmdSetCompanyColour(), CmdSetCompanyManagerFace(), CmdSetCompanyMaxLoan(), CmdSetGoalCompleted(), CmdSetGoalDestination(), CmdSetGoalProgress(), CmdSetGoalText(), CmdSetGroupFlag(), CmdSetGroupLivery(), CmdSetStoryPageDate(), CmdSetStoryPageTitle(), CmdSetVehicleVisibility(), CmdShowStoryPage(), CmdStoryPageButton(), CmdTerraformLand(), CmdTownCargoGoal(), CmdTownGrowthRate(), CmdTownRating(), CmdTownSetText(), CmdUpdateLeagueTableElementData(), CmdUpdateLeagueTableElementScore(), CmdUpdateStoryPageElement(), CmdWantEnginePreview(), CompaniesGenStatistics(), CompaniesPayInterest(), CompanyCanRenameSign(), ConvertRoadTypeOwner(), CountArticulatedParts(), CreateRandomTown(), AIInstance::Died(), DoBuildLock(), DoDryUp(), DoFloodTile(), CrashLog::FillCrashLog(), ObjectPickerCallbacks::FillUsedItems(), FindJoiningBaseStation(), FloodHalftile(), AI::GameLoop(), Game::GameLoop(), ScriptInstance::GameLoop(), GetAvailableMoneyForCommand(), RefitWindow::GetCapacityString(), GetClosestDeletedStation(), GetDefaultServiceInterval(), GetFreeUnitNumber(), GetMaskOfTownActions(), GetNewEngineType(), GetRating(), AIInstance::GetSetting(), GetTileHighlightType(), VehicleScopeResolver::GetVariable(), ObjectScopeResolver::GetVariable(), RoadStopScopeResolver::GetVariable(), StationScopeResolver::GetVariable(), GrowTown(), HandleStationRefit(), AIInstance::Initialize(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), IsLocalCompany(), AI::IsPaused(), LiveryHelper(), CommandHelperBase::LogCommandExecution(), VideoDriver_Dedicated::MainLoop(), NetworkClientsToSpectators(), Game::NewEvent(), AI::NewEvent(), BuildVehicleWindow::OnClick(), LandInfoWindow::OnInit(), BuildIndustryWindow::OnPlaceObject(), AI::Pause(), PlaceInitialIndustry(), RemoveAirport(), RemoveBuoy(), RemoveFromRailBaseStation(), RemoveGenericRoadStop(), RemoveRailStation(), RemoveRailStation(), RemoveRailWaypoint(), RemoveRoad(), RemoveRoadStop(), RemoveRoadWaypointStop(), Game::Save(), AI::Save(), SearchLumberMillTrees(), ServiceIntervalSettingsValueText(), SetDefaultCompanySettings(), SetLocalCompany(), Game::StartNew(), AI::StartNew(), StateGameLoop(), AI::Stop(), SubtractMoneyFromCompany(), SyncCompanySettings(), TileLoop_Town(), TownActionAdvertiseLarge(), TownActionAdvertiseMedium(), TownActionAdvertiseSmall(), TownActionBribe(), TownActionBuildStatue(), TownActionBuyRights(), TownActionRoadRebuild(), Game::Uninitialize(), AI::Unpause(), UpdateAllServiceInterval(), ValParamRailType(), ValParamRoadType(), and VehicleEnterDepot().
|
extern |
Company controlled by the human player at this client. Can also be COMPANY_SPECTATOR.
Definition at line 52 of file company_cmd.cpp.
Referenced by _GenerateWorld(), AddNearbyStation(), AgeVehicle(), AircraftEntersTerminal(), AircraftHandleDestTooFar(), CanBuildVehicleInfrastructure(), CcStartStopVehicle(), ChangeOwnershipOfCompanyItems(), CheckOrders(), ClickChangeCompanyCheat(), CmdBuildBridge(), CmdBuyCompany(), CmdCompanyCtrl(), CmdCustomNewsItem(), CmdGoalQuestion(), CmdGoalQuestionAnswer(), CmdScrollViewport(), CmdShowStoryPage(), CompanyCheckBankrupt(), CrashAirplane(), DisableEngineForCompany(), DrawEngineList(), DrawNewObjectTileInGUI(), DrawRoadDepotSprite(), DrawRoadStopTile(), DrawStationTile(), BuildAirportWindow::DrawWidget(), ReplaceVehicleWindow::DrawWidget(), EnginePreviewWindow::DrawWidget(), NewsWindow::DrawWidget(), StatusBarWindow::DrawWidget(), TownAuthorityWindow::DrawWidget(), TownDirectoryWindow::DrawWidget(), EnableEngineForCompany(), CrashLog::FillCrashLog(), StationPickerCallbacks::FillUsedItems(), WaypointPickerCallbacks::FillUsedItems(), RoadStopPickerCallbacks< roadstoptype >::FillUsedItems(), RoadWaypointPickerCallbacks::FillUsedItems(), FindStationsAroundSelection(), FindStationsNearby(), GenerateDefaultSaveName(), ReplaceVehicleWindow::GenerateLists(), ReplaceVehicleWindow::GenerateReplaceVehList(), GenerateWorld(), RefitWindow::GetCapacityString(), GetEngineLivery(), GetOrderCmdFromTile(), SmallMapWindow::GetOverlayCompanyMask(), GetRailTypeDropDownList(), ReplaceVehicleWindow::GetWidgetString(), BuildVehicleWindow::GetWidgetString(), HandleClickOnSign(), Vehicle::HandlePathfindingResult(), CommandHelperBase::InternalExecuteProcessResult(), InvalidateAutoreplaceWindow(), InvalidateCompanyWindows(), IsInteractiveCompany(), IsLocalCompany(), VehicleDetailsWindow::IsVehicleServiceIntervalEnabled(), LoadUnloadVehicle(), VideoDriver_Dedicated::MainLoop(), MakeScreenshotName(), NetworkClientsToSpectators(), NetworkServerSendChat(), ReplaceVehicleWindow::OnClick(), CompanyWindow::OnClick(), GoalListWindow::OnClick(), OrdersWindow::OnClick(), StatusBarWindow::OnClick(), SelectCompanyLiveryWindow::OnDropdownSelect(), OrdersWindow::OnHotkey(), MainToolbarWindow::OnHotkey(), LandInfoWindow::OnInit(), SelectCompanyLiveryWindow::OnInvalidateData(), EnginePreviewWindow::OnInvalidateData(), GoalListWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), WaypointWindow::OnInvalidateData(), ReplaceVehicleWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), SelectCompanyLiveryWindow::OnPaint(), CompanyWindow::OnPaint(), DepotWindow::OnPaint(), VehicleGroupWindow::OnPaint(), EndGameWindow::OnPaint(), OrdersWindow::OnPaint(), StationViewWindow::OnPaint(), TimetableWindow::OnPaint(), MainToolbarWindow::OnPaint(), TownAuthorityWindow::OnPaint(), VehicleListWindow::OnPaint(), VehicleDetailsWindow::OnPaint(), VehicleViewWindow::OnPaint(), SignList::OwnerVisibilityFilter(), Vehicle::PreDestructor(), RoadVehArrivesAt(), SaveHighScoreValueNetwork(), SetDefaultRailGui(), SetLocalCompany(), SetSettingValue(), CompanyFinancesWindow::SetupWidgets(), ShipArrivesAt(), ShowBuildAirToolbar(), ShowBuildDocksToolbar(), ShowBuildRailToolbar(), ShowBuildRoadToolbar(), ShowEndGameChart(), ShowTerraformToolbar(), SyncCompanySettings(), TownDirectoryWindow::TownRatingSorter(), TrainEnterStation(), UpdateStationAcceptance(), VehicleEnterDepot(), and WhoCanServiceIndustry().