diff options
author | rubidium <rubidium@openttd.org> | 2009-04-11 17:09:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-11 17:09:38 +0000 |
commit | f99b125c84ee15466490fc1736626edc2a083e2a (patch) | |
tree | 16089a5d970662cfd9703918a05cbdcc4da20f4a | |
parent | ec0635e59bea2a7b39afdca04a7074f41a07b9c4 (diff) | |
download | openttd-f99b125c84ee15466490fc1736626edc2a083e2a.tar.xz |
(svn r16029) -Fix [FS#2785]: do not give "... Mines" as name to the station of oil rigs, or more general: do not add "... Mines" when the all of the cargoes are part of the liquid, passenger or mail classes.
-rw-r--r-- | src/station_cmd.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 63f17d4e9..e601e57e9 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -148,8 +148,12 @@ static bool CMSAMine(TileIndex tile) if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false; for (uint i = 0; i < lengthof(ind->produced_cargo); i++) { - /* The industry extracts something non-liquid, i.e. no oil or plastic, so it is a mine */ - if (ind->produced_cargo[i] != CT_INVALID && (GetCargo(ind->produced_cargo[i])->classes & CC_LIQUID) == 0) return true; + /* The industry extracts something non-liquid, i.e. no oil or plastic, so it is a mine. + * Also the production of passengers and mail is ignored. */ + if (ind->produced_cargo[i] != CT_INVALID && + (GetCargo(ind->produced_cargo[i])->classes & (CC_LIQUID | CC_PASSENGERS | CC_MAIL)) == 0) { + return true; + } } return false; |