economy.c
changeset 1634 2d30b94f6b5d
parent 1561 e1e58de5f24a
child 1651 a0083373f924
equal deleted inserted replaced
1633:329a0b826a64 1634:2d30b94f6b5d
  1130 	FOR_ALL_INDUSTRIES(ind) {
  1130 	FOR_ALL_INDUSTRIES(ind) {
  1131 		if (ind->xy != 0 && (cargo_type == ind->accepts_cargo[0] || cargo_type
  1131 		if (ind->xy != 0 && (cargo_type == ind->accepts_cargo[0] || cargo_type
  1132 				 == ind->accepts_cargo[1] || cargo_type == ind->accepts_cargo[2]) &&
  1132 				 == ind->accepts_cargo[1] || cargo_type == ind->accepts_cargo[2]) &&
  1133 				 ind->produced_cargo[0] != 0xFF &&
  1133 				 ind->produced_cargo[0] != 0xFF &&
  1134 				 ind->produced_cargo[0] != cargo_type &&
  1134 				 ind->produced_cargo[0] != cargo_type &&
  1135 				 (t = DistanceManhattan(ind->xy, xy)) < u) {
  1135 				 (t = DistanceManhattan(ind->xy, xy)) < 2 * u) {
  1136 			u = t;
  1136 			u = t;
  1137 			best = ind;
  1137 			best = ind;
  1138 		}
  1138 		}
  1139 	}
  1139 	}
  1140 
  1140