src/industry_cmd.cpp
changeset 7637 43e2956af72e
parent 7629 711bbbc7a171
child 7640 8cf1b20cc69f
equal deleted inserted replaced
7636:ec035c803c21 7637:43e2956af72e
   383 	 * with magic_bulldozer cheat you can destroy industries
   383 	 * with magic_bulldozer cheat you can destroy industries
   384 	 * (area around OILRIG is water, so water shouldn't flood it
   384 	 * (area around OILRIG is water, so water shouldn't flood it
   385 	 */
   385 	 */
   386 	if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
   386 	if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
   387 			!_cheats.magic_bulldozer.value) ||
   387 			!_cheats.magic_bulldozer.value) ||
       
   388 			((flags & DC_AUTO) != 0) ||
   388 			(_current_player == OWNER_WATER && (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER))) {
   389 			(_current_player == OWNER_WATER && (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER))) {
   389 		SetDParam(0, indspec->name);
   390 		SetDParam(0, indspec->name);
   390 		return_cmd_error(STR_4800_IN_THE_WAY);
   391 		return_cmd_error(STR_4800_IN_THE_WAY);
   391 	}
   392 	}
   392 
   393 
  2017 				// allow autoslope
  2018 				// allow autoslope
  2018 				return _price.terraform;
  2019 				return _price.terraform;
  2019 			}
  2020 			}
  2020 		}
  2021 		}
  2021 	}
  2022 	}
  2022 	return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); // funny magic bulldozer
  2023 	return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  2023 }
  2024 }
  2024 
  2025 
  2025 extern const TileTypeProcs _tile_type_industry_procs = {
  2026 extern const TileTypeProcs _tile_type_industry_procs = {
  2026 	DrawTile_Industry,           /* draw_tile_proc */
  2027 	DrawTile_Industry,           /* draw_tile_proc */
  2027 	GetSlopeZ_Industry,          /* get_slope_z_proc */
  2028 	GetSlopeZ_Industry,          /* get_slope_z_proc */