File diff r15072:0c171c464368 → r15073:02cc9885c126
src/industry_cmd.cpp
Show inline comments
 
@@ -23,12 +23,13 @@
 
#include "cheat_type.h"
 
#include "genworld.h"
 
#include "tree_map.h"
 
#include "newgrf.h"
 
#include "newgrf_cargo.h"
 
#include "newgrf_commons.h"
 
#include "newgrf_debug.h"
 
#include "newgrf_industries.h"
 
#include "newgrf_industrytiles.h"
 
#include "autoslope.h"
 
#include "water.h"
 
#include "strings_func.h"
 
#include "functions.h"
 
@@ -138,12 +139,14 @@ Industry::~Industry()
 
	 * Also we must not decrement industry counts in that case. */
 
	if (this->location.w == 0) return;
 

	
 
	TILE_AREA_LOOP(tile_cur, this->location) {
 
		if (IsTileType(tile_cur, MP_INDUSTRY)) {
 
			if (GetIndustryIndex(tile_cur) == this->index) {
 
				DeleteNewGRFInspectWindow(GSF_INDUSTRYTILES, tile_cur);
 

	
 
				/* MakeWaterKeepingClass() can also handle 'land' */
 
				MakeWaterKeepingClass(tile_cur, OWNER_NONE);
 

	
 
				/* MakeWaterKeepingClass() doesn't remove animation if the tiles
 
				 * become watery, but be on the safe side an always remote it. */
 
				DeleteAnimatedTile(tile_cur);
 
@@ -170,12 +173,13 @@ Industry::~Industry()
 
	ReleaseDisastersTargetingIndustry(this->index);
 

	
 
	DecIndustryTypeCount(this->type);
 

	
 
	DeleteIndustryNews(this->index);
 
	DeleteWindowById(WC_INDUSTRY_VIEW, this->index);
 
	DeleteNewGRFInspectWindow(GSF_INDUSTRIES, this->index);
 

	
 
	DeleteSubsidyWith(ST_INDUSTRY, this->index);
 
	CargoPacket::InvalidateAllFrom(ST_INDUSTRY, this->index);
 
}
 

	
 
/**