diff --git a/Glamourer/Automation/AutoDesignApplier.cs b/Glamourer/Automation/AutoDesignApplier.cs index c765584..b1f3c8b 100644 --- a/Glamourer/Automation/AutoDesignApplier.cs +++ b/Glamourer/Automation/AutoDesignApplier.cs @@ -272,13 +272,6 @@ public class AutoDesignApplier : IDisposable if (!state.ModelData.IsHuman || !design.IsHuman) return; - // Skip invalid designs entirely. - if (_config.SkipInvalidCustomizations - && (customize.Clan != design.Customize.Clan - || customize.Gender != design.Customize.Gender - || customize.Face != design.Customize.Face)) - return; - if (customizeFlags.HasFlag(CustomizeFlag.Clan)) { if (!respectManual || state[CustomizeIndex.Clan] is not StateChanged.Source.Manual) @@ -289,9 +282,6 @@ public class AutoDesignApplier : IDisposable if (customizeFlags.HasFlag(CustomizeFlag.Gender)) { - if (_config.SkipInvalidCustomizations && customize.Gender != design.Customize.Gender) - return; - if (!respectManual || state[CustomizeIndex.Gender] is not StateChanged.Source.Manual) fixFlags |= _customizations.ChangeGender(ref customize, design.Customize.Gender); customizeFlags &= ~CustomizeFlag.Gender; diff --git a/Glamourer/Configuration.cs b/Glamourer/Configuration.cs index f950782..80632d0 100644 --- a/Glamourer/Configuration.cs +++ b/Glamourer/Configuration.cs @@ -24,7 +24,6 @@ public class Configuration : IPluginConfiguration, ISavable public bool EnableAutoDesigns { get; set; } = true; public bool IncognitoMode { get; set; } = false; public bool UnlockDetailMode { get; set; } = true; - public bool SkipInvalidCustomizations { get; set; } = false; public bool HideApplyCheckmarks { get; set; } = false; public bool SmallEquip { get; set; } = false; public bool UnlockedItemMode { get; set; } = false; diff --git a/Glamourer/Gui/Tabs/DebugTab.cs b/Glamourer/Gui/Tabs/DebugTab.cs index 183099a..d800828 100644 --- a/Glamourer/Gui/Tabs/DebugTab.cs +++ b/Glamourer/Gui/Tabs/DebugTab.cs @@ -157,6 +157,7 @@ public unsafe class DebugTab : ITab ImGui.TableNextColumn(); if (actor.IsCharacter) { + ImGui.TextUnformatted(actor.AsCharacter->CharacterData.ModelCharaId.ToString()); if (actor.AsCharacter->CharacterData.TransformationId != 0) ImGui.TextUnformatted($"Transformation Id: {actor.AsCharacter->CharacterData.TransformationId}"); if (actor.AsCharacter->CharacterData.ModelCharaId_2 != -1) diff --git a/Glamourer/Gui/Tabs/DesignTab/DesignDetailTab.cs b/Glamourer/Gui/Tabs/DesignTab/DesignDetailTab.cs index 68471d6..42953b1 100644 --- a/Glamourer/Gui/Tabs/DesignTab/DesignDetailTab.cs +++ b/Glamourer/Gui/Tabs/DesignTab/DesignDetailTab.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics; -using System.IO; using System.Numerics; using Dalamud.Interface; using Dalamud.Interface.Internal.Notifications; @@ -25,7 +24,9 @@ public class DesignDetailTab private string? _newDescription; private string? _newName; - private bool _editDescriptionMode; + private bool _editDescriptionMode; + private Design? _changeDesign; + private DesignFileSystem.Leaf? _changeLeaf; public DesignDetailTab(SaveService saveService, DesignFileSystemSelector selector, DesignManager manager, DesignFileSystem fileSystem) { @@ -62,18 +63,22 @@ public class DesignDetailTab var name = _newName ?? _selector.Selected!.Name; ImGui.SetNextItemWidth(width.X); if (ImGui.InputText("##Name", ref name, 128)) - _newName = name; - - if (ImGui.IsItemDeactivatedAfterEdit()) { - _manager.Rename(_selector.Selected!, name); - _newName = null; + _newName = name; + _changeDesign = _selector.Selected; + } + + if (ImGui.IsItemDeactivatedAfterEdit() && _changeDesign != null) + { + _manager.Rename(_changeDesign, name); + _newName = null; + _changeDesign = null; } var identifier = _selector.Selected!.Identifier.ToString(); ImGuiUtil.DrawFrameColumn("Unique Identifier"); ImGui.TableNextColumn(); - var fileName = _saveService.FileNames.DesignFile(_selector.Selected!); + var fileName = _saveService.FileNames.DesignFile(_selector.Selected!); using (var mono = ImRaii.PushFont(UiBuilder.MonoFont)) { if (ImGui.Button(identifier, width)) @@ -95,13 +100,17 @@ public class DesignDetailTab var path = _newPath ?? _selector.SelectedLeaf!.FullName(); ImGui.SetNextItemWidth(width.X); if (ImGui.InputText("##Path", ref path, 1024)) - _newPath = path; + { + _newPath = path; + _changeLeaf = _selector.SelectedLeaf!; + } - if (ImGui.IsItemDeactivatedAfterEdit()) + if (ImGui.IsItemDeactivatedAfterEdit() && _changeLeaf != null) try { - _fileSystem.RenameAndMove(_selector.SelectedLeaf!, path); - _newPath = null; + _fileSystem.RenameAndMove(_changeLeaf, path); + _newPath = null; + _changeLeaf = null; } catch (Exception ex) { diff --git a/Glamourer/Gui/Tabs/SettingsTab.cs b/Glamourer/Gui/Tabs/SettingsTab.cs index c4cf5cb..9189abc 100644 --- a/Glamourer/Gui/Tabs/SettingsTab.cs +++ b/Glamourer/Gui/Tabs/SettingsTab.cs @@ -44,9 +44,6 @@ public class SettingsTab : ITab Checkbox("Enabled", "Enable main functionality of keeping and applying state.", _stateListener.Enabled, _stateListener.Enable); Checkbox("Enable Auto Designs", "Enable the application of designs associated to characters to be applied automatically.", _config.EnableAutoDesigns, v => _config.EnableAutoDesigns = v); - Checkbox("Skip Invalid Customizations", - "Entirely skip customizations for any automatically applied design that does not have the same race, gender or face as the affected character currently has.", - _config.SkipInvalidCustomizations, v => _config.SkipInvalidCustomizations = v); Checkbox("Restricted Gear Protection", "Use gender- and race-appropriate models when detecting certain items not available for a characters current gender and race.", _config.UseRestrictedGearProtection, v => _config.UseRestrictedGearProtection = v);