Change: Deliver cargo to the closest industry first (#9536)

This commit is contained in:
dP
2022-02-19 21:08:23 +03:00
committed by GitHub
parent e68bf58989
commit 36bee83864
6 changed files with 60 additions and 26 deletions

View File

@@ -1040,9 +1040,10 @@ static uint DeliverGoodsToIndustry(const Station *st, CargoID cargo_type, uint n
uint accepted = 0;
for (Industry *ind : st->industries_near) {
for (const auto &i : st->industries_near) {
if (num_pieces == 0) break;
Industry *ind = i.industry;
if (ind->index == source) continue;
uint cargo_index;