|
@@ -134,13 +134,13 @@ 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.
|
|
|
* 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) {
|
|
|
(CargoSpec::Get(ind->produced_cargo[i])->classes & (CC_LIQUID | CC_PASSENGERS | CC_MAIL)) == 0) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}
|
|
@@ -179,13 +179,13 @@ static bool CMSAForest(TileIndex tile)
|
|
|
|
|
|
/* No extractive industry */
|
|
|
if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_ORGANIC) == 0) return false;
|
|
|
|
|
|
for (uint i = 0; i < lengthof(ind->produced_cargo); i++) {
|
|
|
/* The industry produces wood. */
|
|
|
if (ind->produced_cargo[i] != CT_INVALID && GetCargo(ind->produced_cargo[i])->label == 'WOOD') return true;
|
|
|
if (ind->produced_cargo[i] != CT_INVALID && CargoSpec::Get(ind->produced_cargo[i])->label == 'WOOD') return true;
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
#define M(x) ((x) - STR_SV_STNAME)
|
|
@@ -408,13 +408,13 @@ static uint GetAcceptanceMask(const Stat
|
|
|
/** Items contains the two cargo names that are to be accepted or rejected.
|
|
|
* msg is the string id of the message to display.
|
|
|
*/
|
|
|
static void ShowRejectOrAcceptNews(const Station *st, uint num_items, CargoID *cargo, StringID msg)
|
|
|
{
|
|
|
for (uint i = 0; i < num_items; i++) {
|
|
|
SetDParam(i + 1, GetCargo(cargo[i])->name);
|
|
|
SetDParam(i + 1, CargoSpec::Get(cargo[i])->name);
|
|
|
}
|
|
|
|
|
|
SetDParam(0, st->index);
|
|
|
AddNewsItem(msg, NS_ACCEPTANCE, NR_STATION, st->index);
|
|
|
}
|
|
|
|