OpenTTD Source 20241224-master-gf74b0cf984
|
Public Member Functions | |
auto | operator<=> (const CompanyInfrastructure &) const =default |
uint32_t | GetRailTotal () const |
Get total sum of all owned track bits. | |
uint32_t | GetRoadTotal () const |
Get total sum of all owned road bits. | |
uint32_t | GetTramTotal () const |
Get total sum of all owned tram bits. | |
Data Fields | |
std::array< uint32_t, RAILTYPE_END > | rail {} |
Count of company owned track bits for each rail type. | |
std::array< uint32_t, ROADTYPE_END > | road {} |
Count of company owned track bits for each road type. | |
uint32_t | signal |
Count of company owned signals. | |
uint32_t | water |
Count of company owned track bits for canals. | |
uint32_t | station |
Count of company owned station tiles. | |
uint32_t | airport |
Count of company owned airports. | |
Definition at line 32 of file company_base.h.
|
inline |
Get total sum of all owned track bits.
Definition at line 43 of file company_base.h.
References rail.
Referenced by CompanyInfrastructureWindow::DrawWidget(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), and CompanyInfrastructureWindow::UpdateWidgetSize().
uint32_t CompanyInfrastructure::GetRoadTotal | ( | ) | const |
Get total sum of all owned road bits.
Definition at line 1264 of file company_cmd.cpp.
References road, ROADTYPE_BEGIN, and ROADTYPE_END.
Referenced by CompanyInfrastructureWindow::DrawWidget(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), and CompanyInfrastructureWindow::UpdateWidgetSize().
uint32_t CompanyInfrastructure::GetTramTotal | ( | ) | const |
Get total sum of all owned tram bits.
Definition at line 1277 of file company_cmd.cpp.
References road, ROADTYPE_BEGIN, and ROADTYPE_END.
Referenced by CompanyInfrastructureWindow::DrawWidget(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), and CompanyInfrastructureWindow::UpdateWidgetSize().
uint32_t CompanyInfrastructure::airport |
Count of company owned airports.
Definition at line 38 of file company_base.h.
Referenced by CompanyInfrastructureWindow::DrawWidget(), and CompanyInfrastructureWindow::UpdateWidgetSize().
std::array<uint32_t, RAILTYPE_END> CompanyInfrastructure::rail {} |
Count of company owned track bits for each rail type.
Definition at line 33 of file company_base.h.
Referenced by CmdBuildBridge(), CmdBuildRailStation(), CmdBuildRoad(), CmdBuildTunnel(), CmdConvertRail(), CompanyInfrastructureWindow::DrawWidget(), GetRailTotal(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), RemoveRoad(), and CompanyInfrastructureWindow::UpdateWidgetSize().
std::array<uint32_t, ROADTYPE_END> CompanyInfrastructure::road {} |
Count of company owned track bits for each road type.
Definition at line 34 of file company_base.h.
Referenced by CmdBuildBridge(), CmdBuildTunnel(), ConvertRoadTypeOwner(), CompanyInfrastructureWindow::DrawWidget(), GetRoadTotal(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), GetTramTotal(), UpdateCompanyRoadInfrastructure(), and CompanyInfrastructureWindow::UpdateWidgetSize().
uint32_t CompanyInfrastructure::signal |
Count of company owned signals.
Definition at line 35 of file company_base.h.
Referenced by CompanyInfrastructureWindow::DrawWidget(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), and CompanyInfrastructureWindow::UpdateWidgetSize().
uint32_t CompanyInfrastructure::station |
Count of company owned station tiles.
Definition at line 37 of file company_base.h.
Referenced by CmdBuildRailStation(), CmdBuildRailWaypoint(), CompanyInfrastructureWindow::DrawWidget(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), and CompanyInfrastructureWindow::UpdateWidgetSize().
uint32_t CompanyInfrastructure::water |
Count of company owned track bits for canals.
Definition at line 36 of file company_base.h.
Referenced by CmdBuildBridge(), DoBuildLock(), CompanyInfrastructureWindow::DrawWidget(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), RemoveLock(), and CompanyInfrastructureWindow::UpdateWidgetSize().