Skip to content

Commit

Permalink
Remove Debug Assert that triggers now apparently.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottermandias committed Mar 20, 2024
1 parent 411ab84 commit 633a01f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Glamourer/Interop/Penumbra/PenumbraService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand All @@ -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();
Expand Down

0 comments on commit 633a01f

Please sign in to comment.