Add Mare Synchronos and MUI API/IPC functions for testing. Not tested myself because how.

This commit is contained in:
Ottermandias 2022-06-19 19:20:02 +02:00
parent 8422d36e4e
commit d6d13594e0
15 changed files with 857 additions and 240 deletions

View file

@ -74,6 +74,17 @@ public partial class ModCollection
public static ModCollection CreateNewEmpty( string name )
=> new(name, CurrentVersion, new Dictionary< string, ModSettings.SavedSettings >());
// Create a new temporary collection that does not save and has a negative index.
public static ModCollection CreateNewTemporary(string tag, string characterName)
{
var collection = new ModCollection($"{tag}_{characterName}_temporary", Empty);
collection.ModSettingChanged -= collection.SaveOnChange;
collection.InheritanceChanged -= collection.SaveOnChange;
collection.Index = ~Penumbra.TempMods.Collections.Count;
collection.CreateCache();
return collection;
}
// Duplicate the calling collection to a new, unique collection of a given name.
public ModCollection Duplicate( string name )
=> new(name, this);