industry_cmd.c
changeset 1019 6bae6c11e865
parent 1005 f48b2bdd84fc
child 1035 812f837ee03f
equal deleted inserted replaced
1018:3212d4365653 1019:6bae6c11e865
  1374 	FOR_ALL_INDUSTRIES(i) {
  1374 	FOR_ALL_INDUSTRIES(i) {
  1375 		// check if an industry that accepts the same goods is nearby
  1375 		// check if an industry that accepts the same goods is nearby
  1376 		if (i->xy != 0 &&
  1376 		if (i->xy != 0 &&
  1377 				(GetTileDist1D(tile, i->xy) <= 14) &&
  1377 				(GetTileDist1D(tile, i->xy) <= 14) &&
  1378 				spec->accepts_cargo[0] != 0xFF &&
  1378 				spec->accepts_cargo[0] != 0xFF &&
  1379 				spec->accepts_cargo[0] == i->accepts_cargo[0] && 
  1379 				spec->accepts_cargo[0] == i->accepts_cargo[0] &&
  1380 				!(_game_mode == GM_EDITOR && 
  1380 				!(_game_mode == GM_EDITOR &&
  1381 					_patches.same_industry_close &&
  1381 					_patches.same_industry_close &&
  1382 					_patches.multiple_industry_per_town)) {
  1382 					_patches.multiple_industry_per_town)) {
  1383 				_error_message = STR_INDUSTRY_TOO_CLOSE;
  1383 				_error_message = STR_INDUSTRY_TOO_CLOSE;
  1384 				return false;
  1384 				return false;
  1385 				}
  1385 				}