OpenTTD Source 20250312-master-gcdcc6b491d
|
Types related to companies. More...
Go to the source code of this file.
Data Structures | |
class | CompanyMask |
Typedefs | |
using | CompanyID = PoolID< uint8_t, struct CompanyIDTag, 0xF, 0xFF > |
using | Owner = CompanyID |
typedef uint32_t | CompanyManagerFace |
Company manager face bits, info see in company_manager_face.h. | |
Enumerations | |
enum | CompanyRemoveReason : uint8_t { CRR_MANUAL , CRR_AUTOCLEAN , CRR_BANKRUPT , CRR_END , CRR_NONE = CRR_MANUAL } |
The reason why the company was removed. More... | |
enum | CompanyCtrlAction : uint8_t { CCA_NEW , CCA_NEW_AI , CCA_DELETE , CCA_END } |
The action to do with CMD_COMPANY_CTRL. More... | |
enum | CompanyAllowListCtrlAction : uint8_t { CALCA_ADD , CALCA_REMOVE , CALCA_END } |
The action to do with CMD_COMPANY_ALLOW_LIST_CTRL. 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.
Definition at line 16 of file company_type.h.
typedef uint32_t CompanyManagerFace |
Company manager face bits, info see in company_manager_face.h.
Definition at line 52 of file company_type.h.
Definition at line 23 of file company_type.h.
enum CompanyAllowListCtrlAction : uint8_t |
The action to do with CMD_COMPANY_ALLOW_LIST_CTRL.
Enumerator | |
---|---|
CALCA_ADD | Create a public key. |
CALCA_REMOVE | Remove a public key. |
CALCA_END | Sentinel for end. |
Definition at line 75 of file company_type.h.
enum CompanyCtrlAction : uint8_t |
The action to do with CMD_COMPANY_CTRL.
Enumerator | |
---|---|
CCA_NEW | Create a new company. |
CCA_NEW_AI | Create a new AI company. |
CCA_DELETE | Delete a company. |
CCA_END | Sentinel for end. |
Definition at line 66 of file company_type.h.
enum CompanyRemoveReason : uint8_t |
The reason why the company was removed.
Definition at line 55 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 NetworkClientListWindow::DrawCompany(), NetworkClientListWindow::DrawWidget(), AfterNewGRFScan::OnNewGRFsScanned(), ParseCompanyFromConnectionString(), 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(), NetworkClientListWindow::DrawCompany(), NetworkClientListWindow::DrawWidget(), StatusBarWindow::DrawWidget(), GenerateWorld(), GetMaskOfTownActions(), CommandHelperBase::InternalExecutePrepTest(), CommandHelperBase::InternalExecuteProcessResult(), CommandHelperBase::InternalExecuteValidateTestAndPrepExec(), LoadIntroGame(), LoadUnloadVehicle(), VideoDriver_Dedicated::MainLoop(), MakeScreenshotName(), MenuClickCompany(), NetworkClientsToSpectators(), 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(), ClearCargoMonitoring(), CmdCompanyCtrl(), CmdCustomNewsItem(), CmdIndustrySetExclusivity(), CmdRemoveSingleRail(), DeliverGoodsToIndustry(), DoCreateNewIndustry(), 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(), CompanyCanRenameSign(), GameInstance::Died(), ScriptListWindow::DrawWidget(), Game::GameLoop(), ScriptConfig::GetTextfile(), ScriptListWindow::GetWidgetString(), ScriptSettingsWindow::GetWidgetString(), ScriptTextfileWindow::GetWidgetString(), ScriptDebugWindow::GetWidgetString(), HandleClickOnSign(), HasRoadTypeAvail(), GameInstance::Initialize(), CommandHelperBase::InternalExecutePrepTest(), ScriptDebugWindow::IsDead(), IsEngineBuildable(), ScriptDebugWindow::IsValidDebugCompany(), SIGNChunkHandler::Load(), Game::NewEvent(), GSConfigWindow::OnClick(), ScriptSettingsWindow::OnClick(), ScriptDebugWindow::OnClick(), GSConfigWindow::OnInvalidateData(), ScriptTextfileWindow::OnInvalidateData(), ScriptDebugWindow::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(), AutoslopeEnabled(), BuildObject(), CompanyStationsWindow::BuildStationsList(), CanConvertUnownedRoadType(), CanRemoveRoadWithStop(), ChangeOwnershipOfCompanyItems(), CheckAllowRemoveRoad(), CheckAllowRemoveTunnelBridge(), CheckClearTile(), CheckFlatLandRoadStop(), CmdBuildBridge(), CmdBuildBuoy(), CmdBuildCanal(), CmdBuildObject(), CmdBuildRoad(), CmdBuildTunnel(), CmdIndustrySetExclusivity(), CmdInsertOrder(), CmdOpenCloseAirport(), CmdRenameWaypoint(), ConvertRoadTypeOwner(), CreateNewIndustry(), DisasterVehicle::DisasterVehicle(), DoCreateNewIndustry(), DrawRoadTypeCatenary(), LinkGraphOverlay::DrawStationDots(), SignListWindow::DrawWidget(), CompanyStationsWindow::DrawWidget(), GetOrderCmdFromTile(), GetRoadOwner(), GetSmallMapOwnerPixels(), 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(), SearchLumberMillTrees(), AIScannerInfo::SelectRandomAI(), SetLocalCompany(), SetRoadOwner(), StateGameLoop(), VehicleListIdentifier::ToWindowNumber(), TownActionBuildStatue(), ViewportAddSignStrings(), ViewportAddStationStrings(), Order::~Order(), 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(), CmdBuildBridge(), CmdBuildIndustry(), CmdBuildRoad(), CmdBuildTunnel(), CmdConvertRoad(), CreateRandomTown(), DoClearBridge(), DoClearTunnel(), DrawRoadTypeCatenary(), GetParamsForOwnedBy(), GetRoadOwner(), GetSmallMapOwnerPixels(), GrowTown(), GrowTownAtRoad(), HasRoadTypeAvail(), HasTownOwnedRoad(), MakeRoadBridgeRamp(), MakeRoadTunnel(), RemoveRoad(), SetRoadOwner(), TestTownOwnsBridge(), 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(), CmdBuildObject(), CmdRemoveSingleRail(), CmdRemoveSingleSignal(), DoDryUp(), DoFloodTile(), FloodHalftile(), GetSmallMapOwnerPixels(), MakeCanal(), MakeRiver(), MakeSea(), MakeShore(), LandInfoWindow::OnInit(), RemoveAirport(), RemoveFromRailBaseStation(), RemoveRailStation(), RemoveRailStation(), RemoveRailWaypoint(), RemoveRoad(), RemoveRoadStop(), and RemoveRoadWaypointStop().