economy.c
changeset 830 36c1366367e4
parent 820 924f78b43e9e
child 863 6a1444534f62
equal deleted inserted replaced
829:e7b66723eba7 830:36c1366367e4
  1125 
  1125 
  1126 	/* Check if there's an industry close to the station that accepts
  1126 	/* Check if there's an industry close to the station that accepts
  1127 	 * the cargo */
  1127 	 * the cargo */
  1128 	best = NULL;
  1128 	best = NULL;
  1129 	u = _patches.station_spread + 8;
  1129 	u = _patches.station_spread + 8;
  1130 	for(ind = _industries; ind != endof(_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=GetTileDist(ind->xy, xy)) < u) {
  1135 				 (t=GetTileDist(ind->xy, xy)) < u) {