diff options
author | glx <glx@openttd.org> | 2007-09-27 21:39:13 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-09-27 21:39:13 +0000 |
commit | 5e45e730375743b5429215644b31d1bb1cfdcf3b (patch) | |
tree | dcfc4308edebdd200f9fae9daf09ec2601ae2212 /src/station_cmd.cpp | |
parent | 02d23c27764c9ff01c3f370c7638012e4520afa1 (diff) | |
download | openttd-5e45e730375743b5429215644b31d1bb1cfdcf3b.tar.xz |
(svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 16 |
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; |