Allow sorting by average order occupancy in shared order group mode

See: #698
This commit is contained in:
Jonathan G Rennison
2024-05-26 11:27:49 +01:00
parent d39bdd352b
commit 431a6a1262
2 changed files with 45 additions and 3 deletions

View File

@@ -62,6 +62,12 @@ struct GUIVehicleGroup {
});
return oldest->economy_age;
}
uint8_t GetOrderOccupancyAverage() const
{
if (this->NumVehicles() < 1) return 0;
return this->vehicles_begin[0]->GetOrderOccupancyAverage();
}
};
typedef GUIList<GUIVehicleGroup, std::nullptr_t, CargoID> GUIVehicleGroupList;