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