Changeset - r28612:2174514a72c6
[Not reviewed]
master
0 4 0
Patric Stout - 10 months ago 2024-01-30 17:02:35
truebrain@openttd.org
Remove: "generation_seed" from config, as it was a write-only value (#11927)
4 files changed with 12 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/genworld.cpp
Show inline comments
 
@@ -307,7 +307,7 @@ void GenerateWorld(GenWorldMode mode, ui
 
		_settings_game.construction.map_height_limit = std::max(MAP_HEIGHT_LIMIT_AUTO_MINIMUM, std::min(MAX_MAP_HEIGHT_LIMIT, estimated_height + MAP_HEIGHT_LIMIT_AUTO_CEILING_ROOM));
 
	}
 

	
 
	if (_settings_game.game_creation.generation_seed == GENERATE_NEW_SEED) _settings_game.game_creation.generation_seed = _settings_newgame.game_creation.generation_seed = InteractiveRandom();
 
	if (_settings_game.game_creation.generation_seed == GENERATE_NEW_SEED) _settings_game.game_creation.generation_seed = InteractiveRandom();
 

	
 
	/* Load the right landscape stuff, and the NewGRFs! */
 
	GfxLoadSprites();
src/openttd.cpp
Show inline comments
 
@@ -430,7 +430,7 @@ struct AfterNewGRFScan : NewGRFScanCallb
 
		SetEffectVolume(_settings_client.music.effect_vol);
 

	
 
		if (startyear != CalendarTime::INVALID_YEAR) IConsoleSetSetting("game_creation.starting_year", startyear.base());
 
		if (generation_seed != GENERATE_NEW_SEED) _settings_newgame.game_creation.generation_seed = generation_seed;
 
		_settings_newgame.game_creation.generation_seed = generation_seed;
 

	
 
		if (!dedicated_host.empty()) {
 
			_network_bind_list.clear();
src/settings.cpp
Show inline comments
 
@@ -159,8 +159,10 @@ enum IniFileVersion : uint32_t {
 
	IFV_GAME_TYPE,                                         ///< 2  PR#9515  Convert server_advertise to server_game_type.
 
	IFV_LINKGRAPH_SECONDS,                                 ///< 3  PR#10610 Store linkgraph update intervals in seconds instead of days.
 
	IFV_NETWORK_PRIVATE_SETTINGS,                          ///< 4  PR#10762 Move no_http_content_downloads / use_relay_service to private settings.
 

	
 
	IFV_AUTOSAVE_RENAME,                                   ///< 5  PR#11143 Renamed values of autosave to be in minutes.
 
	IFV_RIGHT_CLICK_CLOSE,                                 ///< 6  PR#10204 Add alternative right click to close windows setting.
 
	IFV_REMOVE_GENERATION_SEED,                            ///< 7  PR#11927 Remove "generation_seed" from configuration.
 

	
 
	IFV_MAX_VERSION,       ///< Highest possible ini-file version.
 
};
 
@@ -1483,6 +1485,13 @@ void SaveToConfig()
 
		}
 
	}
 

	
 
	if (generic_version < IFV_REMOVE_GENERATION_SEED) {
 
		IniGroup *game_creation = generic_ini.GetGroup("game_creation");
 
		if (game_creation != nullptr) {
 
			game_creation->RemoveItem("generation_seed");
 
		}
 
	}
 

	
 
	/* These variables are migrated from generic ini to private ini now. */
 
	if (generic_version < IFV_NETWORK_PRIVATE_SETTINGS) {
 
		IniGroup *network = generic_ini.GetGroup("network");
src/table/settings/world_settings.ini
Show inline comments
 
@@ -199,6 +199,7 @@ strval   = STR_VARIETY_NONE
 
var      = game_creation.generation_seed
 
type     = SLE_UINT32
 
from     = SLV_30
 
flags    = SF_NOT_IN_CONFIG
 
def      = GENERATE_NEW_SEED
 
min      = 0
 
max      = UINT32_MAX
0 comments (0 inline, 0 general)