diff options
author | belugas <belugas@openttd.org> | 2007-05-29 00:15:34 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-05-29 00:15:34 +0000 |
commit | 35ccad33dd2f4ebc07ce6aba6d0804a05c9d66f9 (patch) | |
tree | dfbc0fb6a88cc1519b057fe6628c5fadfebd91d5 /src/industry_cmd.cpp | |
parent | a6bea527a3af7657947e3c71fc99fdef3858384b (diff) | |
download | openttd-35ccad33dd2f4ebc07ce6aba6d0804a05c9d66f9.tar.xz |
(svn r9969) -Codechange: Cleanup of industries (Step-14). Remove hardcoded-run-time tile acceptance and put in corresponding tile
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 4d852f184..6645c83a6 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -287,14 +287,10 @@ static void GetAcceptedCargo_Industry(TileIndex tile, AcceptedCargo ac) 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) |