Change: Display cargo lists in sorted cargo order. (#11383)

This commit is contained in:
2023-10-20 17:32:17 +01:00
committed by GitHub
parent 088db62dba
commit bb6fa9bf3b
5 changed files with 30 additions and 27 deletions

View File

@@ -876,7 +876,8 @@ struct DepotWindow : Window {
static std::string details;
details.clear();
for (CargoID cargo_type = 0; cargo_type < NUM_CARGO; cargo_type++) {
for (const CargoSpec *cs : _sorted_cargo_specs) {
CargoID cargo_type = cs->Index();
if (capacity[cargo_type] == 0) continue;
SetDParam(0, cargo_type); // {CARGO} #1