summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-10-13 14:22:48 +0000
committerrubidium <rubidium@openttd.org>2014-10-13 14:22:48 +0000
commit8d90e86c2c6b0ae633714d015c0b9dcbba421185 (patch)
tree02ce0d0f48e24a044afbc472bf820bc6f7d0ce36 /src/genworld_gui.cpp
parentfcdbdd60439578a8bae7b3e211e7e088ebcb6785 (diff)
downloadopenttd-8d90e86c2c6b0ae633714d015c0b9dcbba421185.tar.xz
(svn r27009) -Add: extra level of general map heightness (ChillCore)
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index d968663f8..475cef8e7 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -296,7 +296,7 @@ static DropDownList *BuildMapsizeDropDown()
return list;
}
-static const StringID _elevations[] = {STR_TERRAIN_TYPE_VERY_FLAT, STR_TERRAIN_TYPE_FLAT, STR_TERRAIN_TYPE_HILLY, STR_TERRAIN_TYPE_MOUNTAINOUS, INVALID_STRING_ID};
+static const StringID _elevations[] = {STR_TERRAIN_TYPE_VERY_FLAT, STR_TERRAIN_TYPE_FLAT, STR_TERRAIN_TYPE_HILLY, STR_TERRAIN_TYPE_MOUNTAINOUS, STR_TERRAIN_TYPE_ALPINIST, INVALID_STRING_ID};
static const StringID _sea_lakes[] = {STR_SEA_LEVEL_VERY_LOW, STR_SEA_LEVEL_LOW, STR_SEA_LEVEL_MEDIUM, STR_SEA_LEVEL_HIGH, STR_SEA_LEVEL_CUSTOM, INVALID_STRING_ID};
static const StringID _rivers[] = {STR_RIVERS_NONE, STR_RIVERS_FEW, STR_RIVERS_MODERATE, STR_RIVERS_LOT, INVALID_STRING_ID};
static const StringID _smoothness[] = {STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH, STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH, STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH, STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_ROUGH, INVALID_STRING_ID};
@@ -650,7 +650,8 @@ struct GenerateLandscapeWindow : public Window {
break;
case WID_GL_TERRAIN_PULLDOWN: // Terrain type
- ShowDropDownMenu(this, _elevations, _settings_newgame.difficulty.terrain_type, WID_GL_TERRAIN_PULLDOWN, 0, 0);
+ /* For the original map generation only the first four are valid. */
+ ShowDropDownMenu(this, _elevations, _settings_newgame.difficulty.terrain_type, WID_GL_TERRAIN_PULLDOWN, 0, _settings_newgame.game_creation.land_generator == LG_ORIGINAL ? ~0xF : 0);
break;
case WID_GL_WATER_PULLDOWN: { // Water quantity
@@ -723,7 +724,14 @@ struct GenerateLandscapeWindow : public Window {
case WID_GL_RIVER_PULLDOWN: _settings_newgame.game_creation.amount_of_rivers = index; break;
case WID_GL_SMOOTHNESS_PULLDOWN: _settings_newgame.game_creation.tgen_smoothness = index; break;
case WID_GL_VARIETY_PULLDOWN: _settings_newgame.game_creation.variety = index; break;
- case WID_GL_LANDSCAPE_PULLDOWN: _settings_newgame.game_creation.land_generator = index; break;
+
+ case WID_GL_LANDSCAPE_PULLDOWN: _settings_newgame.game_creation.land_generator = index;
+ /* If original landgenerator is selected and alpinist terrain_type was selected, revert to mountainous. */
+ if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL) {
+ _settings_newgame.difficulty.terrain_type = Clamp(_settings_newgame.difficulty.terrain_type, 0, 3);
+ }
+ break;
+
case WID_GL_HEIGHTMAP_ROTATION_PULLDOWN: _settings_newgame.game_creation.heightmap_rotation = index; break;
case WID_GL_TOWN_PULLDOWN: