MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ParseCompanyID

Function ParseCompanyID

src/console_cmds.cpp:951–956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951static std::optional<CompanyID> ParseCompanyID(std::string_view arg)
952{
953 auto company_id = ParseType<CompanyID>(arg);
954 if (company_id.has_value() && *company_id <= MAX_COMPANIES) return static_cast<CompanyID>(*company_id - 1);
955 return company_id;
956}
957
958static bool ConJoinCompany(std::span<std::string_view> argv)
959{

Callers 7

ConJoinCompanyFunction · 0.85
ConMoveClientFunction · 0.85
ConResetCompanyFunction · 0.85
ConNetworkReconnectFunction · 0.85
ConReloadAIFunction · 0.85
ConStopAIFunction · 0.85
ConSayCompanyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected