summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index a964dc334..1507c73e2 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -165,14 +165,14 @@ static bool CMSAMine(TileIndex tile)
/* No industry */
if (!IsTileType(tile, MP_INDUSTRY)) return false;
- const IndustrySpec *indsp = GetIndustrySpec(GetIndustryByTile(tile)->type);
+ const Industry *ind = GetIndustryByTile(tile);
/* No extractive industry */
- if ((indsp->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false;
+ if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_EXTRACTIVE) == 0) return false;
- for (uint i = 0; i < lengthof(indsp->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 */
- if (indsp->produced_cargo[i] != CT_INVALID && (GetCargo(indsp->produced_cargo[i])->classes & CC_LIQUID) == 0) return true;
+ if (ind->produced_cargo[i] != CT_INVALID && (GetCargo(ind->produced_cargo[i])->classes & CC_LIQUID) == 0) return true;
}
return false;
@@ -208,14 +208,14 @@ static bool CMSAForest(TileIndex tile)
/* No industry */
if (!IsTileType(tile, MP_INDUSTRY)) return false;
- const IndustrySpec *indsp = GetIndustrySpec(GetIndustryByTile(tile)->type);
+ const Industry *ind = GetIndustryByTile(tile);
/* No extractive industry */
- if ((indsp->life_type & INDUSTRYLIFE_ORGANIC) == 0) return false;
+ if ((GetIndustrySpec(ind->type)->life_type & INDUSTRYLIFE_ORGANIC) == 0) return false;
- for (uint i = 0; i < lengthof(indsp->produced_cargo); i++) {
+ for (uint i = 0; i < lengthof(ind->produced_cargo); i++) {
/* The industry produces wood. */
- if (indsp->produced_cargo[i] != CT_INVALID && GetCargo(indsp->produced_cargo[i])->label == 'WOOD') return true;
+ if (ind->produced_cargo[i] != CT_INVALID && GetCargo(ind->produced_cargo[i])->label == 'WOOD') return true;
}
return false;