Fix crash on mannequins with resource logging on, fix problem with temp collections not keeping count.

This commit is contained in:
Ottermandias 2023-02-03 21:23:38 +01:00
parent 60f54fa047
commit e34aca68aa
9 changed files with 42 additions and 18 deletions

View file

@ -85,12 +85,13 @@ 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 name )
public static ModCollection CreateNewTemporary( string name, int changeCounter )
{
var collection = new ModCollection( name, Empty );
collection.ModSettingChanged -= collection.SaveOnChange;
collection.InheritanceChanged -= collection.SaveOnChange;
collection.Index = ~Penumbra.TempMods.Collections.Count;
collection.ChangeCounter = changeCounter;
collection.CreateCache();
return collection;
}