diff --git a/FrostyEditor/Windows/MainWindow.xaml.cs b/FrostyEditor/Windows/MainWindow.xaml.cs index dd172b5b7..0274aa4d1 100644 --- a/FrostyEditor/Windows/MainWindow.xaml.cs +++ b/FrostyEditor/Windows/MainWindow.xaml.cs @@ -434,9 +434,14 @@ private void launchButton_Click(object sender, RoutedEventArgs e) cancelToken.Token.ThrowIfCancellationRequested(); // Remove mods.json task.Update("Removing mods.json"); - if (File.Exists(App.FileSystem.BasePath + "\\ModData\\Editor\\Update\\Patch\\Data\\mods.json")) + string gamePatchPath = "Patch"; + if (ProfilesLibrary.DataVersion == (int)ProfileVersion.Fifa17 || ProfilesLibrary.DataVersion == (int)ProfileVersion.DragonAgeInquisition || ProfilesLibrary.DataVersion == (int)ProfileVersion.Battlefield4 || ProfilesLibrary.DataVersion == (int)ProfileVersion.NeedForSpeed || ProfilesLibrary.DataVersion == (int)ProfileVersion.PlantsVsZombiesGardenWarfare2 || ProfilesLibrary.DataVersion == (int)ProfileVersion.NeedForSpeedRivals) + gamePatchPath = "Update\\Patch\\Data"; + else if (ProfilesLibrary.DataVersion == (int)ProfileVersion.PlantsVsZombiesBattleforNeighborville || ProfilesLibrary.DataVersion == (int)ProfileVersion.Battlefield5) //bfn and bfv dont have a patch directory + gamePatchPath = "Data"; + if (File.Exists(App.FileSystem.BasePath + $"\\ModData\\{App.SelectedPack}\\{gamePatchPath}\\mods.json")) { - File.Delete(App.FileSystem.BasePath + "\\ModData\\Editor\\Update\\Patch\\Data\\mods.json"); + File.Delete(App.FileSystem.BasePath + $"\\ModData\\{App.SelectedPack}\\{gamePatchPath}\\mods.json"); App.Logger.Log("Removed mods.json"); } task.Update(""); diff --git a/FrostyModSupport/FrostyModExecutor.cs b/FrostyModSupport/FrostyModExecutor.cs index 142b51dd8..012a2d8e9 100644 --- a/FrostyModSupport/FrostyModExecutor.cs +++ b/FrostyModSupport/FrostyModExecutor.cs @@ -1756,7 +1756,7 @@ public int Run(FileSystem inFs, CancellationToken cancelToken, ILogger inLogger, } else { - App.Logger.Log("No modding required, start with last mod."); + App.Logger.Log("Launching with previously generated data."); } cancelToken.ThrowIfCancellationRequested();