savagame compatibility
for 'move active_mods and mp_era to game_classification'
This commit is contained in:
parent
5759404121
commit
45fec655c2
1 changed files with 14 additions and 0 deletions
|
@ -840,6 +840,16 @@ static void convert_old_saves_1_13_1(config& cfg)
|
|||
}
|
||||
}
|
||||
}
|
||||
//changes done during 1.15.3+dev
|
||||
static void convert_old_saves_1_15_3(config& cfg)
|
||||
{
|
||||
if(cfg["era_id"].empty()) {
|
||||
cfg["era_id"] = cfg.child_or_empty("multiplayer")["mp_era"];
|
||||
}
|
||||
if(cfg["active_mods"].empty()) {
|
||||
cfg["active_mods"] = cfg.child_or_empty("multiplayer")["active_mods"];
|
||||
}
|
||||
}
|
||||
|
||||
void convert_old_saves(config& cfg)
|
||||
{
|
||||
|
@ -858,6 +868,10 @@ void convert_old_saves(config& cfg)
|
|||
{
|
||||
convert_old_saves_1_13_1(cfg);
|
||||
}
|
||||
if(loaded_version < version_info("1.15.4"))
|
||||
{
|
||||
convert_old_saves_1_15_3(cfg);
|
||||
}
|
||||
LOG_RG<<"cfg after conversion "<<cfg<<"\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue