Use CargoID instead of CargoSpec in town_production_cargoes

This commit is contained in:
Jonathan G Rennison
2024-02-19 04:02:24 +00:00
parent 19e4895ffd
commit 6ab1f9a416
3 changed files with 4 additions and 5 deletions

View File

@@ -595,8 +595,7 @@ public:
StringID str_last_period = EconTime::UsingWallclockUnits() ? STR_TOWN_VIEW_CARGO_LAST_MINUTE_MAX : STR_TOWN_VIEW_CARGO_LAST_MONTH_MAX;
for (auto tpe : {TPE_PASSENGERS, TPE_MAIL}) {
for (const CargoSpec *cs : CargoSpec::town_production_cargoes[tpe]) {
CargoID cid = cs->Index();
for (CargoID cid : CargoSpec::town_production_cargoes[tpe]) {
SetDParam(0, 1ULL << cid);
SetDParam(1, this->town->supplied[cid].old_act);
SetDParam(2, this->town->supplied[cid].old_max);