Remove Debug Assert that triggers now apparently.

This commit is contained in:
Ottermandias 2024-03-20 22:25:44 +01:00
parent 411ab84d80
commit 633a01f176

View file

@ -162,7 +162,7 @@ public unsafe class PenumbraService : IDisposable
try try
{ {
collection ??= _currentCollection.Invoke(ApiCollectionType.Current); 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) switch (ec)
{ {
case PenumbraApiEc.ModMissing: return $"The mod {mod.Name} [{mod.DirectoryName}] could not be found."; case PenumbraApiEc.ModMissing: return $"The mod {mod.Name} [{mod.DirectoryName}] could not be found.";
@ -188,10 +188,13 @@ public unsafe class PenumbraService : IDisposable
case PenumbraApiEc.OptionMissing: case PenumbraApiEc.OptionMissing:
sb.AppendLine($"Could not find all desired options in the option group {setting} in mod {mod.Name}."); sb.AppendLine($"Could not find all desired options in the option group {setting} in mod {mod.Name}.");
break; 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(); return sb.ToString();