From 633a01f176a7a558394ea6aac06b521c0f63571a Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Wed, 20 Mar 2024 22:25:44 +0100 Subject: [PATCH] Remove Debug Assert that triggers now apparently. --- Glamourer/Interop/Penumbra/PenumbraService.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Glamourer/Interop/Penumbra/PenumbraService.cs b/Glamourer/Interop/Penumbra/PenumbraService.cs index 4e1d9c49..c7297aa6 100644 --- a/Glamourer/Interop/Penumbra/PenumbraService.cs +++ b/Glamourer/Interop/Penumbra/PenumbraService.cs @@ -162,7 +162,7 @@ public string SetMod(Mod mod, ModSettings settings, string? collection = null) try { collection ??= _currentCollection.Invoke(ApiCollectionType.Current); - var ec = _setMod.Invoke(collection, mod.DirectoryName, mod.Name, settings.Enabled); + var ec = _setMod.Invoke(collection, mod.DirectoryName, mod.Name, settings.Enabled); switch (ec) { case PenumbraApiEc.ModMissing: return $"The mod {mod.Name} [{mod.DirectoryName}] could not be found."; @@ -188,10 +188,13 @@ public string SetMod(Mod mod, ModSettings settings, string? collection = null) case PenumbraApiEc.OptionMissing: sb.AppendLine($"Could not find all desired options in the option group {setting} in mod {mod.Name}."); break; + case PenumbraApiEc.Success: + case PenumbraApiEc.NothingChanged: + break; + default: + sb.AppendLine($"Could not apply options in the option group {setting} in mod {mod.Name} for unknown reason {ec}."); + break; } - - Debug.Assert(ec is PenumbraApiEc.Success or PenumbraApiEc.NothingChanged, - "Missing Mod or Collection should not be possible here."); } return sb.ToString();