@@ -12,9 +12,7 @@ use std::sync::atomic::Ordering;
1212use std:: sync:: mpsc:: Receiver ;
1313use std:: sync:: mpsc:: Sender ;
1414use std:: sync:: mpsc:: TryRecvError ;
15- use std:: sync:: mpsc:: {
16- self ,
17- } ;
15+ use std:: sync:: mpsc:: { self } ;
1816use std:: time:: Duration ;
1917use std:: time:: Instant ;
2018
@@ -77,9 +75,7 @@ use crate::task::BackgroundTaskKind;
7775use crate :: task:: DataExportSettings ;
7876use crate :: task:: ReplayBackgroundParserThreadMessage ;
7977use crate :: task:: ReplayExportFormat ;
80- use crate :: task:: {
81- self ,
82- } ;
78+ use crate :: task:: { self } ;
8379use crate :: twitch:: Token ;
8480use crate :: twitch:: TwitchState ;
8581use crate :: ui:: file_unpacker:: UNPACKER_STOP ;
@@ -89,9 +85,7 @@ use crate::ui::mod_manager::ModManagerInfo;
8985use crate :: ui:: player_tracker:: PlayerTracker ;
9086use crate :: ui:: replay_parser:: Replay ;
9187use crate :: ui:: replay_parser:: SharedReplayParserTabState ;
92- use crate :: ui:: replay_parser:: {
93- self ,
94- } ;
88+ use crate :: ui:: replay_parser:: { self } ;
9589use crate :: wows_data:: WorldOfWarshipsData ;
9690use crate :: wows_data:: load_replay;
9791use crate :: wows_data:: parse_replay;
@@ -420,6 +414,8 @@ pub struct Settings {
420414 pub has_037_crew_skills_fix : bool ,
421415 #[ serde( default = "default_bool::<false>" ) ]
422416 pub has_038_game_params_fix : bool ,
417+ #[ serde( default = "default_bool::<false>" ) ]
418+ pub has_041_game_params_fix : bool ,
423419 #[ serde( default ) ]
424420 pub player_tracker : Arc < RwLock < PlayerTracker > > ,
425421 #[ serde( default ) ]
@@ -455,6 +451,7 @@ impl Default for Settings {
455451 build_consent_window_shown : false ,
456452 has_037_crew_skills_fix : true ,
457453 has_038_game_params_fix : true ,
454+ has_041_game_params_fix : true ,
458455 }
459456 }
460457}
@@ -952,6 +949,14 @@ impl WowsToolkitApp {
952949 let _ = std:: fs:: remove_file ( game_params_bin_path ( ) ) ;
953950 }
954951
952+ // Added the Achievements to the GameParams
953+ if !saved_state. tab_state . settings . has_041_game_params_fix {
954+ saved_state. tab_state . settings . has_041_game_params_fix = true ;
955+
956+ // Remove the old game params
957+ let _ = std:: fs:: remove_file ( game_params_bin_path ( ) ) ;
958+ }
959+
955960 if !saved_state. tab_state . settings . wows_dir . is_empty ( ) {
956961 let task = Some ( saved_state. tab_state . load_game_data ( PathBuf :: from ( saved_state. tab_state . settings . wows_dir . clone ( ) ) ) ) ;
957962 update_background_task ! ( saved_state. tab_state. background_tasks, task) ;
0 commit comments