(svn r26885) -Feature-ish: user interface for limiting the maximum height of a map

This commit is contained in:
rubidium
2014-09-21 12:25:04 +00:00
parent d17a4e0918
commit fa193ece85
8 changed files with 93 additions and 24 deletions

View File

@@ -106,7 +106,7 @@ static CommandCost TerraformTileHeight(TerraformerState *ts, TileIndex tile, int
/* Check range of destination height */
if (height < 0) return_cmd_error(STR_ERROR_ALREADY_AT_SEA_LEVEL);
if (height > (int)MAX_TILE_HEIGHT) return_cmd_error(STR_ERROR_TOO_HIGH);
if (height > _settings_game.construction.max_heightlevel) return_cmd_error(STR_ERROR_TOO_HIGH);
/*
* Check if the terraforming has any effect.
@@ -360,7 +360,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
}
/* Check range of destination height */
if (h > MAX_TILE_HEIGHT) return_cmd_error((oldh == 0) ? STR_ERROR_ALREADY_AT_SEA_LEVEL : STR_ERROR_TOO_HIGH);
if (h > _settings_game.construction.max_heightlevel) return_cmd_error((oldh == 0) ? STR_ERROR_ALREADY_AT_SEA_LEVEL : STR_ERROR_TOO_HIGH);
Money money = GetAvailableMoneyForCommand();
CommandCost cost(EXPENSES_CONSTRUCTION);