Update IPC to use better mechanisms for temporary collections without breaking backwards compatibility.

This commit is contained in:
Ottermandias 2022-11-21 16:57:17 +01:00
parent 16a56eb5d0
commit 74ed6edd6f
6 changed files with 106 additions and 19 deletions

View file

@ -84,9 +84,9 @@ public partial class ModCollection
=> 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 )
public static ModCollection CreateNewTemporary( string name )
{
var collection = new ModCollection( $"{tag}_{characterName}", Empty );
var collection = new ModCollection( name, Empty );
collection.ModSettingChanged -= collection.SaveOnChange;
collection.InheritanceChanged -= collection.SaveOnChange;
collection.Index = ~Penumbra.TempMods.Collections.Count;