(svn r1791) Remove the remnants of CMD_DESTROY_INDUSTRY, which was removed a long time ago
authortron
Fri, 04 Feb 2005 17:14:36 +0000
changeset 1287 450ecf56b3c8
parent 1286 da05e4dc75b5
child 1288 0ade62186168
(svn r1791) Remove the remnants of CMD_DESTROY_INDUSTRY, which was removed a long time ago
command.c
command.h
industry_cmd.c
industry_gui.c
--- a/command.c	Fri Feb 04 16:50:18 2005 +0000
+++ b/command.c	Fri Feb 04 17:14:36 2005 +0000
@@ -75,7 +75,6 @@
 DEF_COMMAND(CmdRestoreOrderIndex);
 
 DEF_COMMAND(CmdBuildIndustry);
-//DEF_COMMAND(CmdDestroyIndustry);
 
 DEF_COMMAND(CmdBuildCompanyHQ);
 DEF_COMMAND(CmdDestroyCompanyHQ);
@@ -309,8 +308,6 @@
 	CmdGiveMoney,									/* 113 */
 	CmdChangePatchSetting,				/* 114 */
 	CmdReplaceVehicle,						/* 115 */
-
-	//CmdDestroyIndustry,					/* 109 */
 };
 
 /* This function range-checks a cmd, and checks if the cmd is not NULL */
--- a/command.h	Fri Feb 04 16:50:18 2005 +0000
+++ b/command.h	Fri Feb 04 17:14:36 2005 +0000
@@ -149,7 +149,6 @@
 	CMD_CHANGE_PATCH_SETTING = 114,
 
 	CMD_REPLACE_VEHICLE = 115,
-	//CMD_DESTROY_INDUSTRY = 109,
 };
 
 enum {
--- a/industry_cmd.c	Fri Feb 04 16:50:18 2005 +0000
+++ b/industry_cmd.c	Fri Feb 04 17:14:36 2005 +0000
@@ -411,30 +411,6 @@
 	return 0;
 }
 
-/* p1 index of industry to destroy */
-/* Destroy Industry button costing money removed per request of dominik
-int32 CmdDestroyIndustry(int x, int y, uint32 flags, uint32 p1, uint32 p2)
-{
-	uint tile = TILE_FROM_XY(x,y);
-	Industry *i = GetIndustry((uint16)p1);
-  Town *t = ClosestTownFromTile(tile, (uint)-1); // find closest town to penaltize (ALWAYS penaltize)
-
-	SET_EXPENSES_TYPE(EXPENSES_OTHER);
-
-	// check if you're allowed to remove the industry. Minimum amount
-	// of ratings to remove the industry depends on difficulty setting
-	if (!CheckforTownRating(tile, flags, t, INDUSTRY_REMOVE))
-		return CMD_ERROR;
-
-	if (flags & DC_EXEC) {
-		DeleteIndustry(i);
-		CreateEffectVehicleAbove(x + 8,y + 8, 2, EV_DEMOLISH);
-		ChangeTownRating(t, RATING_INDUSTRY_DOWN_STEP, RATING_INDUSTRY_MINIMUM);
-	}
-
-	return (_price.build_industry >> 5) * _industry_type_costs[i->type]*2;
-}
-*/
 
 static const byte _industry_min_cargo[] = {
 	5, 5, 5, 30, 5, 5, 5, 5,
--- a/industry_gui.c	Fri Feb 04 16:50:18 2005 +0000
+++ b/industry_gui.c	Fri Feb 04 17:14:36 2005 +0000
@@ -381,17 +381,6 @@
 			i = GetIndustry(w->window_number);
 			ScrollMainWindowToTile(i->xy + TILE_XY(1,1));
 			break;
-		case 7:
-			// Destroy Industry button costing money removed per request of dominik
-			//i = GetIndustry(w->window_number);
-			/*	passing only i->xy is not safe if industry has a weird shape like:
-					_ X X
-					X X X
-					_ <--- grass, no industry, but i->xy points there (first top-left tile)!,
-					so passing i->xy to destroy industry will fail in called procedure
-			*/
-			//DoCommandP(i->xy, w->window_number, 0, CcPlaySound10,  CMD_DESTROY_INDUSTRY | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA));
-			break;
 		}
 		}
 		break;