Improve meta manipulation handling a bit.

This commit is contained in:
Ottermandias 2024-06-08 14:55:10 +02:00
parent 250c4034e0
commit d7b60206d7
14 changed files with 242 additions and 66 deletions

View file

@ -160,7 +160,7 @@ public class TemporaryApi(
/// Only returns true if all conversions are successful and distinct.
/// </summary>
private static bool ConvertManips(string manipString,
[NotNullWhen(true)] out HashSet<MetaManipulation>? manips)
[NotNullWhen(true)] out MetaDictionary? manips)
{
if (manipString.Length == 0)
{
@ -174,7 +174,7 @@ public class TemporaryApi(
return false;
}
manips = new HashSet<MetaManipulation>(manipArray!.Length);
manips = new MetaDictionary(manipArray!.Length);
foreach (var manip in manipArray.Where(m => m.Validate()))
{
if (manips.Add(manip))

View file

@ -43,7 +43,7 @@ public class TempModManager : IDisposable
=> _modsForAllCollections;
public RedirectResult Register(string tag, ModCollection? collection, Dictionary<Utf8GamePath, FullPath> dict,
HashSet<MetaManipulation> manips, ModPriority priority)
MetaDictionary manips, ModPriority priority)
{
var mod = GetOrCreateMod(tag, collection, priority, out var created);
Penumbra.Log.Verbose($"{(created ? "Created" : "Changed")} temporary Mod {mod.Name}.");