mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(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.
This commit is contained in:
parent
ec0635e59b
commit
f99b125c84
@ -148,8 +148,12 @@ static bool CMSAMine(TileIndex tile)
|
|||||||
if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false;
|
if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false;
|
||||||
|
|
||||||
for (uint i = 0; i < lengthof(ind->produced_cargo); i++) {
|
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 */
|
/* 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;
|
* 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;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user