mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
Ref T171, count of aircraft supporting parts
* added functions in providers, aware class * some utility functions in aircraft list
This commit is contained in:
@@ -195,5 +195,35 @@ namespace BlackMisc
|
||||
this->push_back(aircraft);
|
||||
return true;
|
||||
}
|
||||
|
||||
int CSimulatedAircraftList::countEnabled() const
|
||||
{
|
||||
int c = 0;
|
||||
for (const CSimulatedAircraft &aircraft : (*this))
|
||||
{
|
||||
if (aircraft.isEnabled()) { c++; }
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
int CSimulatedAircraftList::countRendered() const
|
||||
{
|
||||
int c = 0;
|
||||
for (const CSimulatedAircraft &aircraft : (*this))
|
||||
{
|
||||
if (aircraft.isRendered()) { c++; }
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
int CSimulatedAircraftList::countAircraftPartsSyncronized() const
|
||||
{
|
||||
int c = 0;
|
||||
for (const CSimulatedAircraft &aircraft : (*this))
|
||||
{
|
||||
if (aircraft.isPartsSynchronized()) { c++; }
|
||||
}
|
||||
return c;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user