diff --git a/Penumbra/Collections/Manager/CollectionType.cs b/Penumbra/Collections/Manager/CollectionType.cs index 8c51fd90..c25413b8 100644 --- a/Penumbra/Collections/Manager/CollectionType.cs +++ b/Penumbra/Collections/Manager/CollectionType.cs @@ -107,6 +107,9 @@ public static class CollectionTypeExtensions public static bool IsSpecial(this CollectionType collectionType) => collectionType < CollectionType.Default; + public static bool CanBeRemoved(this CollectionType collectionType) + => collectionType.IsSpecial() || collectionType is CollectionType.Individual; + public static readonly (CollectionType, string, string)[] Special = Enum.GetValues() .Where(IsSpecial) .Select(s => (s, s.ToName(), s.ToDescription())) diff --git a/Penumbra/UI/CollectionTab/CollectionPanel.cs b/Penumbra/UI/CollectionTab/CollectionPanel.cs index 8625335e..bb22e6a7 100644 --- a/Penumbra/UI/CollectionTab/CollectionPanel.cs +++ b/Penumbra/UI/CollectionTab/CollectionPanel.cs @@ -287,7 +287,7 @@ public sealed class CollectionPanel : IDisposable _active.SetCollection(ModCollection.Empty, type, _active.Individuals.GetGroup(identifier)); } - if (collection != null) + if (collection != null && type.CanBeRemoved()) { using var color = ImRaii.PushColor(ImGuiCol.Text, Colors.RegexWarningBorder); if (ImGui.MenuItem("Remove this assignment."))