using OtterGui.Classes; using Penumbra.Collections; using Penumbra.Collections.Manager; namespace Penumbra.Communication; /// /// Triggered whenever collection setup is changed. /// /// Parameter is the type of the changed collection. (Inactive or Temporary for additions or deletions) /// Parameter is the old collection, or null on additions. /// Parameter is the new collection, or null on deletions. /// Parameter is the display name for Individual collections or an empty string otherwise. /// public sealed class CollectionChange : EventWrapper, CollectionChange.Priority> { public enum Priority { /// DalamudSubstitutionProvider = -3, /// CollectionCacheManager = -2, /// ActiveCollections = -1, /// TempModManager = 0, /// InheritanceManager = 0, /// IdentifiedCollectionCache = 0, /// ItemSwapTab = 0, /// CollectionSelector = 0, /// IndividualAssignmentUi = 0, /// ModFileSystemSelector = 0, } public CollectionChange() : base(nameof(CollectionChange)) { } public void Invoke(CollectionType collectionType, ModCollection? oldCollection, ModCollection? newCollection, string displayName) => Invoke(this, collectionType, oldCollection, newCollection, displayName); }