diff --git a/Glamourer.zip b/Glamourer.zip index bd3dd06..dfa7a37 100644 Binary files a/Glamourer.zip and b/Glamourer.zip differ diff --git a/Glamourer/PenumbraAttach.cs b/Glamourer/Api/PenumbraAttach.cs similarity index 81% rename from Glamourer/PenumbraAttach.cs rename to Glamourer/Api/PenumbraAttach.cs index 68c8619..20cc69c 100644 --- a/Glamourer/PenumbraAttach.cs +++ b/Glamourer/Api/PenumbraAttach.cs @@ -6,16 +6,16 @@ using Glamourer.Gui; using ImGuiNET; using Penumbra.GameData.Enums; -namespace Glamourer; +namespace Glamourer.Api; public class PenumbraAttach : IDisposable { public const int RequiredPenumbraShareVersion = 4; - private ICallGateSubscriber? _tooltipSubscriber; + private ICallGateSubscriber? _tooltipSubscriber; private ICallGateSubscriber? _clickSubscriber; - private ICallGateSubscriber? _redrawSubscriberName; - private ICallGateSubscriber? _redrawSubscriberObject; + private ICallGateSubscriber? _redrawSubscriberName; + private ICallGateSubscriber? _redrawSubscriberObject; private readonly ICallGateSubscriber _initializedEvent; private readonly ICallGateSubscriber _disposedEvent; @@ -23,7 +23,7 @@ public class PenumbraAttach : IDisposable public PenumbraAttach(bool attach) { _initializedEvent = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.Initialized"); - _disposedEvent = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.Disposed"); + _disposedEvent = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.Disposed"); _initializedEvent.Subscribe(Reattach); _disposedEvent.Subscribe(Unattach); Reattach(attach); @@ -39,11 +39,11 @@ public class PenumbraAttach : IDisposable Unattach(); var versionSubscriber = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.ApiVersion"); - var version = versionSubscriber.InvokeFunc(); - if (version != RequiredPenumbraShareVersion) + var version = versionSubscriber.InvokeFunc(); + if (version < RequiredPenumbraShareVersion) throw new Exception($"Invalid Version {version}, required Version {RequiredPenumbraShareVersion}."); - _redrawSubscriberName = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.RedrawObjectByName"); + _redrawSubscriberName = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.RedrawObjectByName"); _redrawSubscriberObject = Dalamud.PluginInterface.GetIpcSubscriber("Penumbra.RedrawObject"); if (!attach) @@ -66,9 +66,9 @@ public class PenumbraAttach : IDisposable { _tooltipSubscriber?.Unsubscribe(PenumbraTooltip); _clickSubscriber?.Unsubscribe(PenumbraRightClick); - _tooltipSubscriber = null; - _clickSubscriber = null; - _redrawSubscriberName = null; + _tooltipSubscriber = null; + _clickSubscriber = null; + _redrawSubscriberName = null; if (_redrawSubscriberObject != null) { PluginLog.Debug("Glamourer detached from Penumbra."); @@ -94,9 +94,9 @@ public class PenumbraAttach : IDisposable if (button != MouseButton.Right || type != ChangedItemType.Item) return; - var gPose = Dalamud.Objects[Interface.GPoseObjectId] as Character; - var player = Dalamud.Objects[0] as Character; - var item = (Lumina.Excel.GeneratedSheets.Item)type.GetObject(id)!; + var gPose = Dalamud.Objects[Interface.GPoseObjectId] as Character; + var player = Dalamud.Objects[0] as Character; + var item = (Lumina.Excel.GeneratedSheets.Item)type.GetObject(id)!; var writeItem = new Item(item, string.Empty); if (gPose != null) { diff --git a/Glamourer/Glamourer.csproj b/Glamourer/Glamourer.csproj index 4ef3541..a3214fc 100644 --- a/Glamourer/Glamourer.csproj +++ b/Glamourer/Glamourer.csproj @@ -5,8 +5,8 @@ x64 Glamourer Glamourer - 0.1.0.0 - 0.1.0.0 + 0.1.0.1 + 0.1.0.1 SoftOtter Glamourer Copyright © 2020 diff --git a/Glamourer/Glamourer.json b/Glamourer/Glamourer.json index fc8575c..7702e3d 100644 --- a/Glamourer/Glamourer.json +++ b/Glamourer/Glamourer.json @@ -5,7 +5,7 @@ "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ], "InternalName": "Glamourer", - "AssemblyVersion": "0.1.0.0", + "AssemblyVersion": "0.1.0.1", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", "DalamudApiLevel": 6, diff --git a/repo.json b/repo.json index 85b2348..8effe35 100644 --- a/repo.json +++ b/repo.json @@ -6,8 +6,8 @@ "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ], "InternalName": "Glamourer", - "AssemblyVersion": "0.1.0.0", - "TestingAssemblyVersion": "0.1.0.0", + "AssemblyVersion": "0.1.0.1", + "TestingAssemblyVersion": "0.1.0.1", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", "DalamudApiLevel": 6,