Index: src/lang/english.txt =================================================================== --- src/lang/english.txt (revision 15741) +++ src/lang/english.txt (working copy) @@ -1111,6 +1111,7 @@ STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :{LTBLUE}Proportion of towns that will become cities: {ORANGE}None STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :{LTBLUE}Initial city size multiplier: {ORANGE}{STRING1} STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD :{LTBLUE}Remove absurd road-elements during the road construction: {ORANGE}{STRING1} +STR_CONFIG_PATCHES_MIN_DISTANCE_TOWN :{LTBLUE}Minimum distance between Towns: {ORANGE}{STRING1} STR_CONFIG_SETTING_GUI :{ORANGE}Interface STR_CONFIG_SETTING_CONSTRUCTION :{ORANGE}Construction Index: src/saveload/saveload.cpp =================================================================== --- src/saveload/saveload.cpp (revision 15741) +++ src/saveload/saveload.cpp (working copy) @@ -40,7 +40,7 @@ #include "saveload_internal.h" -extern const uint16 SAVEGAME_VERSION = 115; +extern const uint16 SAVEGAME_VERSION = 116; SavegameType _savegame_type; ///< type of savegame we are loading Index: src/settings.cpp =================================================================== --- src/settings.cpp (revision 15741) +++ src/settings.cpp (working copy) @@ -1396,6 +1396,7 @@ SDT_VAR(GameSettings, construction.raw_industry_construction, SLE_UINT8, 0,MS, 0, 0, 2, 0, STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD, InvalidateBuildIndustryWindow), SDT_BOOL(GameSettings, economy.multiple_industry_per_town, 0, 0, false, STR_CONFIG_SETTING_MULTIPINDTOWN, NULL), SDT_BOOL(GameSettings, economy.same_industry_close, 0, 0, false, STR_CONFIG_SETTING_SAMEINDCLOSE, NULL), + SDT_CONDVAR(GameSettings, economy.minimum_distance_town, SLE_UINT16,116, SL_MAX_VERSION, 0, 0, 20, 10, 500,10, STR_CONFIG_PATCHES_MIN_DISTANCE_TOWN, NULL), SDT_BOOL(GameSettings, economy.bribe, 0, 0, true, STR_CONFIG_SETTING_BRIBE, NULL), SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, NULL), SDT_CONDBOOL(GameSettings, economy.give_money, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_GIVE_MONEY, NULL), Index: src/settings_gui.cpp =================================================================== --- src/settings_gui.cpp (revision 15741) +++ src/settings_gui.cpp (working copy) @@ -1110,6 +1110,7 @@ SettingEntry("economy.town_growth_rate"), SettingEntry("economy.larger_towns"), SettingEntry("economy.initial_city_size"), + SettingEntry("economy.minimum_distance_town"), }; /** Towns sub-page */ static SettingsPage _settings_economy_towns_page = {_settings_economy_towns, lengthof(_settings_economy_towns)}; Index: src/settings_type.h =================================================================== --- src/settings_type.h (revision 15741) +++ src/settings_type.h (working copy) @@ -318,6 +318,7 @@ bool mod_road_rebuild; ///< roadworks remove unneccesary RoadBits bool multiple_industry_per_town; ///< allow many industries of the same type per town bool same_industry_close; ///< allow same type industries to be built close to each other + uint16 minimum_distance_town; ///< minimum distance between towns uint8 town_growth_rate; ///< town growth rate uint8 larger_towns; ///< the number of cities to build. These start off larger and grow twice as fast uint8 initial_city_size; ///< multiplier for the initial size of the cities compared to towns Index: src/town_cmd.cpp =================================================================== --- src/town_cmd.cpp (revision 15741) +++ src/town_cmd.cpp (working copy) @@ -1566,7 +1566,7 @@ } /* Check distance to all other towns. */ - if (IsCloseToTown(tile, 20)) { + if (IsCloseToTown(tile, _settings_game.economy.minimum_distance_town)) { return_cmd_error(STR_0238_TOO_CLOSE_TO_ANOTHER_TOWN); } @@ -1612,7 +1612,7 @@ if (!IsTileType(tile, MP_CLEAR) || GetTileSlope(tile, NULL) != SLOPE_FLAT) continue; /* Check not too close to a town */ - if (IsCloseToTown(tile, 20)) continue; + if (IsCloseToTown(tile, _settings_game.economy.minimum_distance_town)) continue; uint32 townnameparts;