summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-04 16:12:48 +0000
committertron <tron@openttd.org>2005-11-04 16:12:48 +0000
commitd42b7649a43d82407a6a2aae4d2fb86b32556831 (patch)
tree7ad462b13eee9c90e84d78fc40b4dc1fc86cd81a /industry_cmd.c
parenta21762980d70b1639fc4ab7a5cdc6c5d5379b937 (diff)
downloadopenttd-d42b7649a43d82407a6a2aae4d2fb86b32556831.tar.xz
(svn r3135) Use symbolic names in the tables, which hold the information about accepted goods of industry tiles, instead of magic numbers
Diffstat (limited to 'industry_cmd.c')
-rw-r--r--industry_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/industry_cmd.c b/industry_cmd.c
index 66ab18eb1..b0f818984 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -411,16 +411,16 @@ static uint GetSlopeTileh_Industry(const TileInfo* ti)
static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac)
{
int m5 = _m[tile].m5;
- int a;
+ CargoID a;
a = _industry_map5_accepts_1[m5];
- if (a >= 0) ac[a] = (a == 0) ? 1 : 8;
+ if (a != CT_INVALID) ac[a] = (a == 0) ? 1 : 8;
a = _industry_map5_accepts_2[m5];
- if (a >= 0) ac[a] = 8;
+ if (a != CT_INVALID) ac[a] = 8;
a = _industry_map5_accepts_3[m5];
- if (a >= 0) ac[a] = 8;
+ if (a != CT_INVALID) ac[a] = 8;
}
static void GetTileDesc_Industry(TileIndex tile, TileDesc *td)