Skip to content

Commit

Permalink
Fixed #452 (exceptions in mod settings break options for other mods) (#…
Browse files Browse the repository at this point in the history
…453)

* Fixed #452 (exceptions in mod settings break options for other mods)

* put tab instead of spaces
  • Loading branch information
xen-42 authored Jun 13, 2022
1 parent 8f09992 commit 01a0468
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OWML.Launcher/OWML.Manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Alek",
"name": "OWML",
"uniqueName": "Alek.OWML",
"version": "2.5.1",
"version": "2.5.2",
"minGameVersion": "1.1.10.47",
"maxGameVersion": "1.1.12.201"
}
15 changes: 13 additions & 2 deletions src/OWML.ModHelper.Menus/ModConfigMenu.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using OWML.Common;
using System.Linq;
using OWML.Common.Menus;
using System;
using System.Linq;

namespace OWML.ModHelper.Menus
{
Expand Down Expand Up @@ -53,7 +54,17 @@ protected override void OnSave()
}
}
ModData.Storage.Save(ModData.Config, Constants.ModConfigFileName);
Mod?.Configure(ModData.Config);

// Fixes "If one mod throws an exception in Configure all mod settings break" (#452)
try
{
Mod?.Configure(ModData.Config);
}
catch (Exception e)
{
Console.WriteLine($"Exception thrown when changing mod settings: {e.Message}, {e.StackTrace}", MessageType.Error);
}

Close();
}

Expand Down

0 comments on commit 01a0468

Please sign in to comment.