@@ -157,24 +157,27 @@ Industry::~Industry()
if (GetIndustrySpec(this->type)->behaviour & INDUSTRYBEH_PLANT_FIELDS) {
/* Remove the farmland and convert it to regular tiles over time. */
BEGIN_TILE_LOOP(tile_cur, 42, 42, this->xy - TileDiffXY(21, 21)) {
tile_cur = TILE_MASK(tile_cur);
if (IsTileType(tile_cur, MP_CLEAR) && IsClearGround(tile_cur, CLEAR_FIELDS) &&
GetIndustryIndexOfField(tile_cur) == this->index) {
SetIndustryIndexOfField(tile_cur, INVALID_INDUSTRY);
}
} END_TILE_LOOP(tile_cur, 42, 42, this->xy - TileDiff(21, 21))
/* don't let any disaster vehicle target invalid industry */
ReleaseDisastersTargetingIndustry(this->index);
DecIndustryTypeCount(this->type);
DeleteSubsidyWithIndustry(this->index);
DeleteWindowById(WC_INDUSTRY_VIEW, this->index);
InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, 0);
this->xy = 0;
static void IndustryDrawSugarMine(const TileInfo *ti)
{
const DrawIndustryAnimationStruct *d;