src/industry_cmd.cpp
changeset 6736 9f55d5e22875
parent 6683 b88ae30866ce
child 6743 e84a3b89d46b
--- a/src/industry_cmd.cpp	Mon May 28 21:40:40 2007 +0000
+++ b/src/industry_cmd.cpp	Tue May 29 00:15:34 2007 +0000
@@ -287,14 +287,10 @@
 	const IndustryTileSpec *itspec = GetIndustryTileSpec(GetIndustryGfx(tile));
 	CargoID a;
 
-	a = itspec->accepts_cargo[0];
-	if (a != CT_INVALID) ac[a] = (a == CT_PASSENGERS) ? 1 : 8;
-
-	a = itspec->accepts_cargo[1];
-	if (a != CT_INVALID) ac[a] = 8;
-
-	a = itspec->accepts_cargo[2];
-	if (a != CT_INVALID) ac[a] = 8;
+	for (byte i = 0; i < lengthof(itspec->accepts_cargo); i++) {
+		a = itspec->accepts_cargo[i];
+		if (a != CT_INVALID) ac[a] = itspec->acceptance[i];
+	}
 }
 
 static void GetTileDesc_Industry(TileIndex tile, TileDesc *td)