(svn r20659) -Feature: make the (flat) area around an industry configurable (Eddi|zuHause)

This commit is contained in:
rubidium
2010-08-28 18:37:49 +00:00
parent 18e6bf0d71
commit 4ad5ef5c43
6 changed files with 10 additions and 4 deletions

View File

@@ -1452,9 +1452,10 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags,
if (TileX(tile) <= 1 || TileY(tile) <= 1) return false;
/* Check that all tiles in area and surrounding are clear
* this determines that there are no obstructing items */
TileIndex cur_tile = tile + TileDiffXY(-1, -1);
uint size_x = max_x + 4;
uint size_y = max_y + 4;
TileIndex cur_tile = tile + TileDiffXY(-_settings_game.construction.industry_platform, -_settings_game.construction.industry_platform);
uint size_x = max_x + 2 + 2 * _settings_game.construction.industry_platform;
uint size_y = max_y + 2 + 2 * _settings_game.construction.industry_platform;
/* Check if we don't leave the map */
if (TileX(cur_tile) + size_x >= MapMaxX() || TileY(cur_tile) + size_y >= MapMaxY()) return false;