industry_cmd.c
changeset 149 5f7d4b21df01
parent 131 16e59d059384
child 159 139cf78bfb28
equal deleted inserted replaced
148:6a72b12f5588 149:5f7d4b21df01
   376 
   376 
   377 static int32 ClearTile_Industry(uint tile, byte flags)
   377 static int32 ClearTile_Industry(uint tile, byte flags)
   378 {
   378 {
   379 	Industry *i = DEREF_INDUSTRY(_map2[tile]);
   379 	Industry *i = DEREF_INDUSTRY(_map2[tile]);
   380 
   380 
   381  if ((_current_player == OWNER_WATER || _game_mode != GM_EDITOR) && !_cheats.magic_bulldozer.value) {
   381 	/*	* water can destroy industries
       
   382 			* in editor you can bulldoze industries
       
   383 			* with magic_bulldozer cheat you can destroy industries
       
   384 			* (area around OILRIG is water, so water shouldn't flood it
       
   385 	*/
       
   386 	if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
       
   387 			!_cheats.magic_bulldozer.value) ||
       
   388 			(_current_player == OWNER_WATER && i->type == IT_OIL_RIG) ) {
   382  		SET_DPARAM16(0, STR_4802_COAL_MINE + i->type);
   389  		SET_DPARAM16(0, STR_4802_COAL_MINE + i->type);
   383 		return_cmd_error(STR_4800_IN_THE_WAY);
   390 		return_cmd_error(STR_4800_IN_THE_WAY);
   384 	}
   391 	}
   385 
   392 
   386 	if (flags & DC_EXEC) {
   393 	if (flags & DC_EXEC) {