diff --git a/src/lang/extra/english.txt b/src/lang/extra/english.txt index a7868a3e72a..e81d23fba80 100644 --- a/src/lang/extra/english.txt +++ b/src/lang/extra/english.txt @@ -579,6 +579,9 @@ STR_CONFIG_SETTING_MIN_CITY_LAND_AREA_HELPTEXT :Cities can only STR_CONFIG_SETTING_MIN_LAND_AREA_VALUE :{NUM} STR_CONFIG_SETTING_MIN_LAND_AREA_ZERO :Off +STR_CONFIG_SETTING_FLOOD_FROM_EDGES :Water floods from map edges: {STRING2} +STR_CONFIG_SETTING_FLOOD_FROM_EDGES_HELPTEXT :Whether water floods into edge tiles at sea level from the map edge. + STR_CONFIG_SETTING_TREES_AROUND_SNOWLINE :Adjusted arctic tree placement: {STRING2} STR_CONFIG_SETTING_TREES_AROUND_SNOWLINE_HELPTEXT :Adjust placement of trees around snow line in artic climate. Trees thin out above snowline. Trees are a mix of arctic and temperate just below snowline. Below that trees are temperate. STR_CONFIG_SETTING_TREES_AROUND_SNOWLINE_RANGE :Arctic tree range: {STRING2} diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index d1e5e4c9c6a..80814496634 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2455,6 +2455,7 @@ static SettingsContainer &GetSettingsTree() treedist->Add(new SettingEntry("construction.tree_growth_rate")); } + environment->Add(new SettingEntry("construction.flood_from_edges")); environment->Add(new SettingEntry("economy.day_length_factor")); environment->Add(new SettingEntry("station.modified_catchment")); environment->Add(new SettingEntry("station.catchment_increase")); diff --git a/src/settings_type.h b/src/settings_type.h index d5f40c9bb38..f3023cab93c 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -477,6 +477,7 @@ struct ConstructionSettings { uint8 raw_industry_construction; ///< type of (raw) industry construction (none, "normal", prospecting) uint8 industry_platform; ///< the amount of flat land around an industry bool freeform_edges; ///< allow terraforming the tiles at the map edges + bool flood_from_edges; ///< whether water floods from map edges uint8 extra_tree_placement; ///< (dis)allow building extra trees in-game uint8 trees_around_snow_line_range; ///< range around snowline for mixed and arctic forest. bool trees_around_snow_line_enabled; ///< enable mixed and arctic forest around snowline, and no trees above snowline diff --git a/src/table/settings/settings.ini b/src/table/settings/settings.ini index 7c78292f602..adec1739226 100644 --- a/src/table/settings/settings.ini +++ b/src/table/settings/settings.ini @@ -3951,6 +3951,14 @@ pre_cb = CheckFreeformEdges post_cb = UpdateFreeformEdges cat = SC_EXPERT +[SDT_BOOL] +var = construction.flood_from_edges +def = true +str = STR_CONFIG_SETTING_FLOOD_FROM_EDGES +strhelp = STR_CONFIG_SETTING_FLOOD_FROM_EDGES_HELPTEXT +cat = SC_ADVANCED +patxname = ""construction.flood_from_edges"" + [SDT_VAR] var = game_creation.water_borders type = SLE_UINT8 diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index c515acb82f8..2a998f5f7c1 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -1165,7 +1165,7 @@ FloodingBehaviour GetFloodingBehaviour(TileIndex tile) return (GetObjectGroundType(tile) == OBJECT_GROUND_SHORE ? FLOOD_DRYUP : ((GetWaterClass(tile) == WATER_CLASS_SEA) ? FLOOD_ACTIVE : FLOOD_NONE)); case MP_VOID: - return FLOOD_ACTIVE; + return _settings_game.construction.flood_from_edges ? FLOOD_ACTIVE : FLOOD_NONE; default: return FLOOD_NONE;