From f99b125c84ee15466490fc1736626edc2a083e2a Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 11 Apr 2009 17:09:38 +0000 Subject: [PATCH] (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. --- src/station_cmd.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 63f17d4e99..e601e57e98 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;