for (int yc = y1; yc != y2; yc++) {
for (int xc = x1; xc != x2; xc++) {
TileIndex tile = TileXY(xc, yc);
if (_settings_game.station.serve_water_industries) {
AddAcceptedCargo(tile, acceptance, always_accepted);
} else {
if (st_ind == INVALID_INDUSTRY) {
if (!IsTileType(tile, MP_INDUSTRY)) {
AddAcceptedCargo(tile, acceptance, always_accepted);
} else {
if (!HasIndustryStation(Industry::GetByTile(tile))) {
AddAcceptedCargo(tile, acceptance, always_accepted);
}
}
} else {
if (IsTileType(tile, MP_INDUSTRY) && Industry::GetByTile(tile)->index == st_ind) {
AddAcceptedCargo(tile, acceptance, always_accepted);
}
}
}
}
}