Skip to content

Commit

Permalink
[Editor Executor] Resolve conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
shoushou1106 committed Aug 4, 2023
1 parent e215462 commit 460168d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions FrostyEditor/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down
2 changes: 1 addition & 1 deletion FrostyModSupport/FrostyModExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 460168d

Please sign in to comment.