From 77e8f78303f7328eb779c4f9792a00021d0d7b8e Mon Sep 17 00:00:00 2001 From: RisaDev <151885272+RisaDev@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:15:07 +0300 Subject: [PATCH] Cleanup --- .../Armatures/Services/ArmatureManager.cs | 20 ------------------- CustomizePlus/Profiles/Data/Profile.cs | 14 ------------- .../Profiles/Events/ProfileChanged.cs | 9 +-------- CustomizePlus/Profiles/ProfileManager.cs | 6 ------ .../Templates/TemplateEditorManager.cs | 1 - .../Tabs/Templates/TemplatePanel.cs | 2 +- 6 files changed, 2 insertions(+), 50 deletions(-) diff --git a/CustomizePlus/Armatures/Services/ArmatureManager.cs b/CustomizePlus/Armatures/Services/ArmatureManager.cs index 0d286d8..19ecd9b 100644 --- a/CustomizePlus/Armatures/Services/ArmatureManager.cs +++ b/CustomizePlus/Armatures/Services/ArmatureManager.cs @@ -497,22 +497,6 @@ public unsafe sealed class ArmatureManager : IDisposable if (type == ProfileChanged.Type.TemporaryProfileAdded) { - //todo: remove this later - /*Armature? armature = null; - foreach(var kvPair in Armatures) - { - //todo: check mount/companion - if(kvPair.Key.CompareIgnoringOwnership(profile.Character) && - (kvPair.Key.Type != IdentifierType.Owned || kvPair.Key.IsOwnedByLocalPlayer())) - { - armature = kvPair.Value; - break; - } - } - - if (armature == null) - return;*/ - foreach(var character in profile.Characters) { if (!character.IsValid || !Armatures.ContainsKey(character)) @@ -588,10 +572,6 @@ public unsafe sealed class ArmatureManager : IDisposable { (var armatureActorIdentifier, _) = _gameObjectService.GetTrueActorForSpecialTypeActor(kvPair.Key); - //warn: side-effect: for Type = Owned will ignore owner. - //This isn't a particularly huge issue as this is only used for profile rebinding, but this probably should be handled better later. - /*if (actorIdentifier.IsValid && armatureActorIdentifier.MatchesIgnoringOwnership(actorIdentifier)) - yield return kvPair.Value;*/ if (actorIdentifier.IsValid && armatureActorIdentifier.MatchesIgnoringOwnership(actorIdentifier) && (armatureActorIdentifier.Type != IdentifierType.Owned || armatureActorIdentifier.IsOwnedByLocalPlayer())) yield return kvPair.Value; diff --git a/CustomizePlus/Profiles/Data/Profile.cs b/CustomizePlus/Profiles/Data/Profile.cs index 27b9413..48306c7 100644 --- a/CustomizePlus/Profiles/Data/Profile.cs +++ b/CustomizePlus/Profiles/Data/Profile.cs @@ -30,19 +30,10 @@ public sealed class Profile : ISavable public List Armatures = new(); - /* [Obsolete("To be removed in the future versions")] - public LowerString CharacterName { get; set; } = LowerString.Empty;*/ - - //public ActorIdentifier Character { get; set; } = ActorIdentifier.Invalid; public List Characters { get; set; } = new(); public LowerString Name { get; set; } = LowerString.Empty; - /// - /// Whether to search only through local player owned characters or all characters when searching for game object by name - /// - //public bool LimitLookupToOwnedObjects { get; set; } = false; - public bool Enabled { get; set; } public DateTimeOffset CreationDate { get; set; } = DateTime.UtcNow; public DateTimeOffset ModifiedDate { get; set; } = DateTime.UtcNow; @@ -66,11 +57,6 @@ public sealed class Profile : ISavable /// public bool IsTemporary => ProfileType == ProfileType.Temporary; - /* /// - /// Identificator specifying specific actor this profile applies to, only works for temporary profiles - /// - public ActorIdentifier TemporaryActor { get; set; } = ActorIdentifier.Invalid;*/ - public string Incognito => UniqueId.ToString()[..8]; diff --git a/CustomizePlus/Profiles/Events/ProfileChanged.cs b/CustomizePlus/Profiles/Events/ProfileChanged.cs index 4eb08c8..27912c2 100644 --- a/CustomizePlus/Profiles/Events/ProfileChanged.cs +++ b/CustomizePlus/Profiles/Events/ProfileChanged.cs @@ -18,7 +18,6 @@ public sealed class ProfileChanged() : EventWrapper x.Item1.Type != Penumbra.GameData.Enums.IdentifierType.Owned || x.Item1.IsOwnedByLocalPlayer()) diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs index d86eec1..b5a9ad6 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs @@ -117,7 +117,7 @@ public class TemplatePanel : IDisposable private void DrawHeader() => HeaderDrawer.Draw(SelectionName, 0, ImGui.GetColorU32(ImGuiCol.FrameBg), - 1, /*SetFromClipboardButton(),*/ ExportToClipboardButton(), LockButton(), + 1, ExportToClipboardButton(), LockButton(), HeaderDrawer.Button.IncognitoButton(_selector.IncognitoMode, v => _selector.IncognitoMode = v)); private void DrawMultiSelection()