@@ -19,6 +19,7 @@ public partial class MainWindow : Window
1919 public static bool ModsOpened = false ;
2020 public static bool ModsLoading = false ;
2121 public static string GameVersion ;
22+ public static string GameVersionDetected ; // the real game version detected from the game
2223 public static string GameVersionOverride ;
2324 public TaskCompletionSource < bool > VersionLoadStatus = new TaskCompletionSource < bool > ( ) ;
2425
@@ -123,6 +124,7 @@ private async void LoadVersionsAsync()
123124 Dictionary < string , string [ ] > aliases = JsonSerializer . Deserialize < Dictionary < string , string [ ] > > ( body ) ;
124125
125126 string version = Utils . GetVersion ( ) ;
127+ GameVersionDetected = version ;
126128 if ( ! versions . Contains ( version ) && CheckAliases ( versions , aliases , version ) == string . Empty )
127129 {
128130 versions . Insert ( 0 , version ) ;
@@ -275,7 +277,22 @@ private void OptionsButton_Click(object sender, RoutedEventArgs e)
275277
276278 private void InstallButton_Click ( object sender , RoutedEventArgs e )
277279 {
278- Mods . Instance . InstallMods ( ) ;
280+ if ( string . IsNullOrEmpty ( GameVersionOverride ) // game version not listed in aliases at all
281+ && GameVersion != GameVersionDetected ) // and the user manually selected a version
282+ {
283+ // show a waring about the version mismatch
284+ var result = MessageBox . Show ( String . Format ( ( string ) Application . Current . FindResource ( "MainWindow:GameVersionMismatch" ) , GameVersion , GameVersionDetected ) ,
285+ ( string ) Application . Current . FindResource ( "MainWindow:GameVersionMismatchTitle" ) , MessageBoxButton . OKCancel ) ;
286+
287+ if ( result == MessageBoxResult . OK )
288+ {
289+ Mods . Instance . InstallMods ( ) ;
290+ }
291+ }
292+ else
293+ {
294+ Mods . Instance . InstallMods ( ) ;
295+ }
279296 }
280297
281298 private void InfoButton_Click ( object sender , RoutedEventArgs e )
0 commit comments