From 5e45e730375743b5429215644b31d1bb1cfdcf3b Mon Sep 17 00:00:00 2001 From: glx Date: Thu, 27 Sep 2007 21:39:13 +0000 Subject: (svn r11176) -Revert (r9867): as it is needed for newgrf callbacks 14B and 14C --- src/station_cmd.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/station_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf