|
OpenTTD Source 20260311-master-g511d3794ce
|
Types related to companies. More...
Go to the source code of this file.
Data Structures | |
| class | CompanyMask |
| struct | CompanyManagerFace |
Typedefs | |
| using | CompanyID = PoolID<uint8_t, struct CompanyIDTag, 0xF, 0xFF> |
| using | Owner = CompanyID |
Enumerations | |
| enum class | CompanyRemoveReason : uint8_t { Manual , Autoclean , Bankrupt , End , None = Manual } |
| The reason why the company was removed. More... | |
| enum class | CompanyCtrlAction : uint8_t { New , NewAI , Delete } |
| The action to do with Commands::CompanyControl. More... | |
| enum class | CompanyAllowListCtrlAction : uint8_t { AddKey , RemoveKey , AllowAny , AllowListed } |
| The action to do with Commands::CompanyAllowListControl. More... | |
Variables | |
| static constexpr CompanyID | COMPANY_INACTIVE_CLIENT {253} |
| The client is joining. | |
| static constexpr CompanyID | COMPANY_NEW_COMPANY {254} |
| The client wants a new company. | |
| static constexpr CompanyID | COMPANY_SPECTATOR {255} |
| The client is spectating. | |
| static constexpr Owner | OWNER_BEGIN = Owner::Begin() |
| First owner. | |
| static constexpr Owner | OWNER_TOWN {0x0F} |
| A town owns the tile, or a town is expanding. | |
| static constexpr Owner | OWNER_NONE {0x10} |
| The tile has no ownership. | |
| static constexpr Owner | OWNER_WATER {0x11} |
| The tile/execution is done by "water". | |
| static constexpr Owner | OWNER_DEITY {0x12} |
| The object is owned by a superuser / goal script. | |
| static constexpr Owner | OWNER_END {0x13} |
| Last + 1 owner. | |
| static constexpr Owner | INVALID_OWNER = Owner::Invalid() |
| An invalid owner. | |
| static const uint8_t | MAX_COMPANIES = CompanyID::End().base() |
| static const uint | MAX_LENGTH_PRESIDENT_NAME_CHARS = 32 |
| The maximum length of a president name in characters including '\0'. | |
| static const uint | MAX_LENGTH_COMPANY_NAME_CHARS = 32 |
| The maximum length of a company name in characters including '\0'. | |
| static const uint | MAX_HISTORY_QUARTERS = 24 |
| The maximum number of quarters kept as performance's history. | |
| static const uint | MIN_COMPETITORS_INTERVAL = 0 |
| The minimum interval (in minutes) between competitors. | |
| static const uint | MAX_COMPETITORS_INTERVAL = 500 |
| The maximum interval (in minutes) between competitors. | |
Types related to companies.
Definition in file company_type.h.
| typedef Owner CompanyID = PoolID<uint8_t, struct CompanyIDTag, 0xF, 0xFF> |
Definition at line 16 of file company_type.h.
| using Owner = CompanyID |
Definition at line 23 of file company_type.h.
|
strong |
The action to do with Commands::CompanyAllowListControl.
| Enumerator | |
|---|---|
| AddKey | Create a public key. |
| RemoveKey | Remove a public key. |
| AllowAny | Allow joining the company without a key. |
| AllowListed | Allow only listed keys to join the company. |
Definition at line 78 of file company_type.h.
|
strong |
The action to do with Commands::CompanyControl.
| Enumerator | |
|---|---|
| New | Create a new company. |
| NewAI | Create a new AI company. |
| Delete | Delete a company. |
Definition at line 71 of file company_type.h.
|
strong |
The reason why the company was removed.
Definition at line 60 of file company_type.h.
|
staticconstexpr |
The client is joining.
Definition at line 19 of file company_type.h.
|
staticconstexpr |
The client wants a new company.
Definition at line 20 of file company_type.h.
Referenced by ConNetworkConnect(), ConNetworkReconnect(), CompanyButtonLine::Draw(), AfterNewGRFScan::OnNewGRFsScanned(), ParseCompanyFromConnectionString(), NetworkClientListWindow::RebuildList(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(), ServerNetworkGameSocketHandler::Receive_CLIENT_IDENTIFY(), and ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE().
|
staticconstexpr |
The client is spectating.
Definition at line 21 of file company_type.h.
Referenced by CmdCompanyCtrl(), ConJoinCompany(), ConMoveClient(), ConNetworkReconnect(), CompanyButtonLine::Draw(), StatusBarWindow::DrawWidget(), GenerateWorld(), GetMaskOfTownActions(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), LoadIntroGame(), LoadUnloadVehicle(), VideoDriver_Dedicated::MainLoop(), MakeScreenshotName(), MenuClickCompany(), NetworkClientsToSpectators(), NetworkGameLoop(), NetworkServerDoMove(), NetworkGameWindow::OnClick(), StatusBarWindow::OnClick(), GoalListWindow::OnInvalidateData(), CompanyWindow::OnPaint(), MainToolbarWindow::OnPaint(), OnStartGame(), ParseCompanyFromConnectionString(), NetworkClientListWindow::RebuildList(), NetworkClientListWindow::RebuildListCompany(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(), ServerNetworkGameSocketHandler::Receive_CLIENT_IDENTIFY(), ServerNetworkGameSocketHandler::Receive_CLIENT_MOVE(), ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_MAP_DONE(), ClientNetworkGameSocketHandler::Receive_SERVER_MOVE(), SetDefaultRailGui(), and SetLocalCompany().
|
staticconstexpr |
An invalid owner.
Definition at line 30 of file company_type.h.
Referenced by AddSideToSignalBuffer(), AddTrackToSignalBuffer(), AfterLoadGame(), ChangeOwnershipOfCompanyItems(), ChangeTileOwner_Industry(), ChangeTileOwner_Object(), ChangeTileOwner_Rail(), ChangeTileOwner_Road(), ChangeTileOwner_Station(), ChangeTileOwner_TunnelBridge(), ChangeTileOwner_Water(), ClearCargoMonitoring(), CmdCompanyCtrl(), CmdCustomNewsItem(), CmdIndustrySetExclusivity(), CmdRemoveSingleRail(), DeliverGoodsToIndustry(), DoCreateNewIndustry(), GetTileDesc_Road(), GetTileDesc_TunnelBridge(), Window::InitializeData(), SIGNChunkHandler::Load(), ResetLandscapeConfirmationCallback(), and UpdateSignalsInBuffer().
|
static |
Definition at line 32 of file company_type.h.
|
static |
The maximum interval (in minutes) between competitors.
Definition at line 39 of file company_type.h.
Referenced by AIConfigWindow::OnClick(), and AIConfigWindow::OnInvalidateData().
|
static |
The maximum number of quarters kept as performance's history.
Definition at line 36 of file company_type.h.
Referenced by CompaniesGenStatistics().
|
static |
The maximum length of a company name in characters including '\0'.
Definition at line 34 of file company_type.h.
Referenced by CmdRenameCompany(), GenerateCompanyName(), and CompanyWindow::OnClick().
|
static |
The maximum length of a president name in characters including '\0'.
Definition at line 33 of file company_type.h.
Referenced by CmdRenamePresident(), GeneratePresidentName(), and CompanyWindow::OnClick().
|
static |
The minimum interval (in minutes) between competitors.
Definition at line 38 of file company_type.h.
Referenced by AIConfigWindow::OnClick(), and AIConfigWindow::OnInvalidateData().
|
staticconstexpr |
|
staticconstexpr |
The object is owned by a superuser / goal script.
Definition at line 28 of file company_type.h.
Referenced by ScriptListWindow::ChangeScript(), CmdBuildBridge(), CmdBuildIndustry(), CmdBuildObject(), CmdBuildRoad(), CmdBuildSingleRail(), CmdBuildTunnel(), CmdChangeBankBalance(), CmdCreateGoal(), CmdCreateLeagueTable(), CmdCreateLeagueTableElement(), CmdCreateStoryPage(), CmdCreateStoryPageElement(), CmdCreateSubsidy(), CmdCustomNewsItem(), CmdEngineCtrl(), CmdExpandTown(), CmdFoundTown(), CmdGoalQuestion(), CmdGoalQuestionAnswer(), CmdIndustrySetExclusivity(), CmdIndustrySetFlags(), CmdIndustrySetProduction(), CmdIndustrySetText(), CmdPlaceSign(), CmdRemoveGoal(), CmdRemoveLeagueTableElement(), CmdRemoveStoryPage(), CmdRemoveStoryPageElement(), CmdScrollViewport(), CmdSetCompanyMaxLoan(), CmdSetGoalCompleted(), CmdSetGoalDestination(), CmdSetGoalProgress(), CmdSetGoalText(), CmdSetStoryPageDate(), CmdSetStoryPageTitle(), CmdShowStoryPage(), CmdTownCargoGoal(), CmdTownGrowthRate(), CmdTownRating(), CmdTownSetText(), CmdUpdateLeagueTableElementData(), CmdUpdateLeagueTableElementScore(), CmdUpdateStoryPageElement(), CompanyCanEditSign(), GameInstance::Died(), ScriptListWindow::DrawWidget(), Game::GameLoop(), ScriptConfig::GetTextfile(), ScriptDebugWindow::GetWidgetString(), ScriptListWindow::GetWidgetString(), ScriptSettingsWindow::GetWidgetString(), ScriptTextfileWindow::GetWidgetString(), HandleClickOnSign(), HasRoadTypeAvail(), GameInstance::Initialize(), CommandHelperBase::InternalExecutePrepTest(), ScriptDebugWindow::IsDead(), IsEngineBuildable(), ScriptDebugWindow::IsValidDebugCompany(), SIGNChunkHandler::Load(), Game::NewEvent(), GSConfigWindow::OnClick(), ScriptDebugWindow::OnClick(), ScriptSettingsWindow::OnClick(), GSConfigWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), ScriptTextfileWindow::OnInvalidateData(), SignList::OwnerDeityFilter(), SignList::OwnerVisibilityFilter(), Game::Save(), ScriptListWindow::ScriptListWindow(), ScriptDebugWindow::SelectValidDebugCompany(), ShowScriptDebugWindowIfScriptError(), Game::StartNew(), ScriptDebugWindow::UpdateGSButtonState(), and ViewportAddSignStrings().
|
staticconstexpr |
Last + 1 owner.
Definition at line 29 of file company_type.h.
Referenced by CheckOwnership(), and SRNDChunkHandler::Save().
|
staticconstexpr |
The tile has no ownership.
Definition at line 26 of file company_type.h.
Referenced by _GenerateWorld(), LinkGraphOverlay::AddLinks(), AfterLoadGame(), AircraftEventHandler_Flying(), AutoslopeEnabled(), BuildObject(), CompanyStationsWindow::BuildStationsList(), CanConvertUnownedRoadType(), CanRemoveRoadWithStop(), ChangeOwnershipOfCompanyItems(), ChangeTileOwner_Industry(), ChangeTileOwner_Road(), ChangeTileOwner_Station(), ChangeTileOwner_TunnelBridge(), ChangeTileOwner_Water(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckClearTile(), CheckFlatLandRoadStop(), ChopLumberMillTrees(), ClearTile_Object(), ClearTile_Water(), CmdBuildBridge(), CmdBuildBuoy(), CmdBuildCanal(), CmdBuildObject(), CmdBuildRoad(), CmdBuildTunnel(), CmdIndustrySetExclusivity(), CmdInsertOrder(), CmdMoveStationName(), CmdMoveWaypointName(), CmdOpenCloseAirport(), CmdRenameWaypoint(), ConvertRoadTypeOwner(), CreateNewIndustry(), DisasterVehicle::DisasterVehicle(), DoCreateNewIndustry(), DrawRoadTypeCatenary(), LinkGraphOverlay::DrawStationDots(), DrawTile_Object(), CompanyStationsWindow::DrawWidget(), SignListWindow::DrawWidget(), OrderList::FreeChain(), GetOrderCmdFromTile(), GetRoadOwner(), GetSmallMapOwnerPixels(), GetTileDesc_Void(), GrowTownAtRoad(), OrderList::InsertOrderAt(), SIGNChunkHandler::Load(), MakeClear(), MakeField(), MakeOilrig(), MakeTree(), MayLoadUnderExclusiveRights(), MoveBuoysToWaypoints(), CompanyStationsWindow::OnClick(), LandInfoWindow::OnInit(), WaypointWindow::OnInvalidateData(), StationViewWindow::OnPaint(), BuildIndustryWindow::OnPlaceObject(), OnTick_Companies(), PlaceInitialIndustry(), LinkGraphOverlay::RebuildCache(), RemoveGenericRoadStop(), RemoveLock(), AIScannerInfo::SelectRandomAI(), SetLocalCompany(), SetRoadOwner(), StateGameLoop(), VehicleListIdentifier::ToWindowNumber(), TownActionBuildStatue(), ViewportAddSignStrings(), ViewportAddStationStrings(), Industry::~Industry(), and Station::~Station().
|
staticconstexpr |
A town owns the tile, or a town is expanding.
Definition at line 25 of file company_type.h.
Referenced by AfterLoadGame(), CanConvertUnownedRoadType(), CanRemoveRoadWithStop(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckFlatLandRoadStop(), CheckIfCanLevelIndustryPlatform(), CheckIfIndustryTilesAreFree(), CheckOwnership(), ClearTile_Object(), CmdBuildBridge(), CmdBuildIndustry(), CmdBuildRoad(), CmdBuildTunnel(), CmdConvertRoad(), CreateRandomTown(), DoClearBridge(), DoClearTunnel(), DrawRoadTypeCatenary(), GetParamsForOwnedBy(), GetRoadOwner(), GetSmallMapOwnerPixels(), GetTileDesc_Town(), GrowTown(), GrowTownAtRoad(), HasRoadTypeAvail(), HasTownOwnedRoad(), MakeRoadBridgeRamp(), MakeRoadTunnel(), RemoveRoad(), SetRoadOwner(), TestTownOwnsBridge(), TileLoop_Road(), and TileLoop_Town().
|
staticconstexpr |
The tile/execution is done by "water".
Definition at line 27 of file company_type.h.
Referenced by AfterLoadGame(), BuildObject(), CanRemoveRoadWithStop(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), ClearTile_Industry(), ClearTile_Object(), ClearTile_Water(), CmdBuildObject(), CmdRemoveSingleRail(), CmdRemoveSingleSignal(), DoDryUp(), DoFloodTile(), FloodHalftile(), GetSmallMapOwnerPixels(), MakeCanal(), MakeRiver(), MakeSea(), MakeShore(), LandInfoWindow::OnInit(), RemoveAirport(), RemoveFromRailBaseStation(), RemoveRailStation(), RemoveRailStation(), RemoveRailWaypoint(), RemoveRoad(), RemoveRoadStop(), and RemoveRoadWaypointStop().