adjustments;

added lake tropic width adjustment
added an extra large setting to the coasts (51radius)
set minimum width for rivers and lakes to 2 (setting it to 1 actually CTD'd the game)
made max for rivers and lakes be 51 tiles to match the 51tiles of the coast setting.
This commit is contained in:
reldred
2022-03-06 11:03:46 +10:30
parent 22305e8795
commit 59022c40f9
6 changed files with 2107 additions and 8 deletions

View File

@@ -1043,6 +1043,17 @@ static void CreateDesertOrRainForest(uint desert_tropic_line)
SetTropicZone(tile, TROPICZONE_DESERT); SetTropicZone(tile, TROPICZONE_DESERT);
} }
} }
if (_settings_game.game_creation.coast_tropics_width == 3) {
for (data = _make_desert_or_rainforest_data_extralarge;
data != endof(_make_desert_or_rainforest_data_extralarge); ++data) {
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
if (t != INVALID_TILE && (TileHeight(t) >= desert_tropic_line || IsTileType(t, MP_WATER))) break;
}
if (data == endof(_make_desert_or_rainforest_data_extralarge)) {
SetTropicZone(tile, TROPICZONE_DESERT);
}
}
} }
for (uint i = 0; i != 256; i++) { for (uint i = 0; i != 256; i++) {
@@ -1088,6 +1099,17 @@ static void CreateDesertOrRainForest(uint desert_tropic_line)
SetTropicZone(tile, TROPICZONE_RAINFOREST); SetTropicZone(tile, TROPICZONE_RAINFOREST);
} }
} }
if (_settings_game.game_creation.coast_tropics_width == 3) {
for (data = _make_desert_or_rainforest_data_extralarge;
data != endof(_make_desert_or_rainforest_data_extralarge); ++data) {
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
if (t != INVALID_TILE && IsTileType(t, MP_CLEAR) && IsClearGround(t, CLEAR_DESERT)) break;
}
if (data == endof(_make_desert_or_rainforest_data_extralarge)) {
SetTropicZone(tile, TROPICZONE_RAINFOREST);
}
}
} }
} }
@@ -1176,7 +1198,7 @@ static bool MakeLake(TileIndex tile, void *user_data)
MarkTileDirtyByTile(tile); MarkTileDirtyByTile(tile);
/* Remove desert directly around the river tile. */ /* Remove desert directly around the river tile. */
TileIndex t = tile; TileIndex t = tile;
CircularTileSearch(&t, _settings_game.game_creation.river_tropics_width, RiverModifyDesertZone, nullptr); CircularTileSearch(&t, _settings_game.game_creation.lake_tropics_width, RiverModifyDesertZone, nullptr);
return false; return false;
} }
} }

View File

@@ -1679,12 +1679,15 @@ STR_CONFIG_SETTING_RIVERS_TOP_OF_HILL :Rivers require
STR_CONFIG_SETTING_RIVERS_TOP_OF_HILL_HELPTEXT :Choose whether rivers require their springs to generate towards the top of hills. STR_CONFIG_SETTING_RIVERS_TOP_OF_HILL_HELPTEXT :Choose whether rivers require their springs to generate towards the top of hills.
STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH :Tropics width around rivers: {STRING} STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH :Tropics width around rivers: {STRING}
STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH_HELPTEXT :Controls the width of the tropic zone that surrounds rivers in sub-tropic landscape. STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH_HELPTEXT :Controls the width of the tropic zone that surrounds rivers in sub-tropic landscape.
STR_CONFIG_SETTING_LAKE_TROPICS_WIDTH :Tropics width around lakes: {STRING}
STR_CONFIG_SETTING_LAKE_TROPICS_WIDTH_HELPTEXT :Controls the width of the tropic zone that surrounds lakes in sub-tropic landscape.
STR_CONFIG_SETTING_COAST_TROPICS_WIDTH :Tropics width around coasts: {STRING} STR_CONFIG_SETTING_COAST_TROPICS_WIDTH :Tropics width around coasts: {STRING}
STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_HELPTEXT :Controls the width of the tropic zone that surrounds coasts in sub-tropic landscape. STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_HELPTEXT :Controls the width of the tropic zone that surrounds coasts in sub-tropic landscape.
###length 3 ###length 4
STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_DEFAULT :Default STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_DEFAULT :Default (13)
STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_MEDIUM :Medium STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_MEDIUM :Medium (19)
STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_LARGE :Large STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_LARGE :Large (25)
STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_EXTRALARGE :Extra Large (51)
STR_CONFIG_SETTING_LAKE_SIZE :Size of lakes: {STRING} STR_CONFIG_SETTING_LAKE_SIZE :Size of lakes: {STRING}
STR_CONFIG_SETTING_LAKE_SIZE_HELPTEXT :Controls the size of lakes that are generated along rivers. STR_CONFIG_SETTING_LAKE_SIZE_HELPTEXT :Controls the size of lakes that are generated along rivers.
STR_CONFIG_SETTING_LAKE_SIZE_VALUE :{NUM} STR_CONFIG_SETTING_LAKE_SIZE_VALUE :{NUM}

View File

@@ -2108,6 +2108,7 @@ static SettingsContainer &GetSettingsTree()
rivers->Add(new SettingEntry("game_creation.river_route_random")); rivers->Add(new SettingEntry("game_creation.river_route_random"));
rivers->Add(new SettingEntry("game_creation.rivers_top_of_hill")); rivers->Add(new SettingEntry("game_creation.rivers_top_of_hill"));
rivers->Add(new SettingEntry("game_creation.river_tropics_width")); rivers->Add(new SettingEntry("game_creation.river_tropics_width"));
rivers->Add(new SettingEntry("game_creation.lake_tropics_width"));
rivers->Add(new SettingEntry("game_creation.coast_tropics_width")); rivers->Add(new SettingEntry("game_creation.coast_tropics_width"));
rivers->Add(new SettingEntry("game_creation.lake_size")); rivers->Add(new SettingEntry("game_creation.lake_size"));
rivers->Add(new SettingEntry("game_creation.lakes_allowed_in_deserts")); rivers->Add(new SettingEntry("game_creation.lakes_allowed_in_deserts"));

View File

@@ -413,6 +413,7 @@ struct GameCreationSettings {
byte amount_of_rivers; ///< the amount of rivers byte amount_of_rivers; ///< the amount of rivers
bool rivers_top_of_hill; ///< do rivers require starting near the tops of hills? bool rivers_top_of_hill; ///< do rivers require starting near the tops of hills?
uint8 river_tropics_width; ///< the configured width of tropics around rivers uint8 river_tropics_width; ///< the configured width of tropics around rivers
uint8 lake_tropics_width; ///< the configured width of tropics around lakes
uint8 coast_tropics_width; ///< the configured width of tropics around coasts uint8 coast_tropics_width; ///< the configured width of tropics around coasts
uint8 lake_size; ///< how large can lakes get? uint8 lake_size; ///< how large can lakes get?
bool lakes_allowed_in_deserts; ///< are lakes allowed in deserts? bool lakes_allowed_in_deserts; ///< are lakes allowed in deserts?

File diff suppressed because it is too large Load Diff

View File

@@ -3881,8 +3881,8 @@ var = game_creation.river_tropics_width
type = SLE_UINT8 type = SLE_UINT8
flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO
def = 5 def = 5
min = 1 min = 2
max = 12 max = 51
interval = 1 interval = 1
str = STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH str = STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH
strhelp = STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH_HELPTEXT strhelp = STR_CONFIG_SETTING_RIVER_TROPICS_WIDTH_HELPTEXT
@@ -3890,13 +3890,27 @@ strval = STR_JUST_COMMA
cat = SC_BASIC cat = SC_BASIC
patxname = ""rivers.game_creation.river_tropics_width"" patxname = ""rivers.game_creation.river_tropics_width""
[SDT_VAR]
var = game_creation.lake_tropics_width
type = SLE_UINT8
flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO
def = 5
min = 2
max = 51
interval = 1
str = STR_CONFIG_SETTING_LAKE_TROPICS_WIDTH
strhelp = STR_CONFIG_SETTING_LAKE_TROPICS_WIDTH_HELPTEXT
strval = STR_JUST_COMMA
cat = SC_BASIC
patxname = ""rivers.game_creation.lake_tropics_width""
[SDT_VAR] [SDT_VAR]
var = game_creation.coast_tropics_width var = game_creation.coast_tropics_width
type = SLE_UINT8 type = SLE_UINT8
flags = SF_GUI_DROPDOWN | SF_NEWGAME_ONLY flags = SF_GUI_DROPDOWN | SF_NEWGAME_ONLY
def = 0 def = 0
min = 0 min = 0
max = 2 max = 3
interval = 1 interval = 1
str = STR_CONFIG_SETTING_COAST_TROPICS_WIDTH str = STR_CONFIG_SETTING_COAST_TROPICS_WIDTH
strhelp = STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_HELPTEXT strhelp = STR_CONFIG_SETTING_COAST_TROPICS_WIDTH_HELPTEXT