mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Changes for ApiX
Unfinished
This commit is contained in:
parent
3f99d11179
commit
3316c26b1c
41 changed files with 64 additions and 59 deletions
|
|
@ -12,7 +12,7 @@ public sealed class IpcProviders : IDisposable, IApiService
|
||||||
private readonly EventProvider _disposedProvider;
|
private readonly EventProvider _disposedProvider;
|
||||||
private readonly EventProvider _initializedProvider;
|
private readonly EventProvider _initializedProvider;
|
||||||
|
|
||||||
public IpcProviders(DalamudPluginInterface pi, IGlamourerApi api)
|
public IpcProviders(IDalamudPluginInterface pi, IGlamourerApi api)
|
||||||
{
|
{
|
||||||
_disposedProvider = IpcSubscribers.Disposed.Provider(pi);
|
_disposedProvider = IpcSubscribers.Disposed.Provider(pi);
|
||||||
_initializedProvider = IpcSubscribers.Initialized.Provider(pi);
|
_initializedProvider = IpcSubscribers.Initialized.Provider(pi);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Game.ClientState.Objects.Enums;
|
using Dalamud.Game.ClientState.Objects.Enums;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Designs.Special;
|
using Glamourer.Designs.Special;
|
||||||
using Glamourer.Events;
|
using Glamourer.Events;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Interop;
|
using Glamourer.Interop;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using Dalamud.Configuration;
|
using Dalamud.Configuration;
|
||||||
using Dalamud.Game.ClientState.Keys;
|
using Dalamud.Game.ClientState.Keys;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Gui;
|
using Glamourer.Gui;
|
||||||
using Glamourer.Gui.Tabs.DesignTab;
|
using Glamourer.Gui.Tabs.DesignTab;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Automation;
|
using Glamourer.Automation;
|
||||||
using Glamourer.Designs.Links;
|
using Glamourer.Designs.Links;
|
||||||
using Glamourer.Interop.Material;
|
using Glamourer.Interop.Material;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.GameData;
|
using Glamourer.GameData;
|
||||||
using Glamourer.Interop.Material;
|
using Glamourer.Interop.Material;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Interface.Utility.Raii;
|
using Dalamud.Interface.Utility.Raii;
|
||||||
using Glamourer.Gui;
|
using Glamourer.Gui;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Events;
|
using Glamourer.Events;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using OtterGui;
|
using OtterGui;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using OtterGui.Services;
|
using OtterGui.Services;
|
||||||
|
|
@ -16,12 +16,12 @@ public sealed class DesignLinkLoader(DesignStorage designStorage, MessageService
|
||||||
|
|
||||||
protected override void HandleChildNotFound(Design parent, LinkData data)
|
protected override void HandleChildNotFound(Design parent, LinkData data)
|
||||||
{
|
{
|
||||||
Messager.AddMessage(new Notification(
|
Messager.AddMessage(new OtterGui.Classes.Notification(
|
||||||
$"Could not find the design {data.Identity}. If this design was deleted, please re-save {parent.Identifier}.",
|
$"Could not find the design {data.Identity}. If this design was deleted, please re-save {parent.Identifier}.",
|
||||||
NotificationType.Warning));
|
NotificationType.Warning));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void HandleChildNotSet(Design parent, Design child, string error)
|
protected override void HandleChildNotSet(Design parent, Design child, string error)
|
||||||
=> Messager.AddMessage(new Notification($"Could not link {child.Identifier} to {parent.Identifier}: {error}",
|
=> Messager.AddMessage(new OtterGui.Classes.Notification($"Could not link {child.Identifier} to {parent.Identifier}: {error}",
|
||||||
NotificationType.Warning));
|
NotificationType.Warning));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Gui;
|
using Glamourer.Gui;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Dalamud.Interface.Internal;
|
using Dalamud.Interface.Internal;
|
||||||
|
using Dalamud.Interface.Textures;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using OtterGui.Services;
|
using OtterGui.Services;
|
||||||
|
|
@ -32,7 +33,7 @@ public class CustomizeManager : IAsyncDataContainer
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Get specific icons. </summary>
|
/// <summary> Get specific icons. </summary>
|
||||||
public IDalamudTextureWrap GetIcon(uint id)
|
public ISharedImmediateTexture GetIcon(uint id)
|
||||||
=> _icons.LoadIcon(id)!;
|
=> _icons.LoadIcon(id)!;
|
||||||
|
|
||||||
/// <summary> Iterate over all supported genders and clans. </summary>
|
/// <summary> Iterate over all supported genders and clans. </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Dalamud;
|
using Dalamud;
|
||||||
|
using Dalamud.Game;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
using Lumina.Excel;
|
using Lumina.Excel;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public class Glamourer : IDalamudPlugin
|
||||||
|
|
||||||
private readonly ServiceManager _services;
|
private readonly ServiceManager _services;
|
||||||
|
|
||||||
public Glamourer(DalamudPluginInterface pluginInterface)
|
public Glamourer(IDalamudPluginInterface pluginInterface)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -128,7 +128,7 @@ public class Glamourer : IDalamudPlugin
|
||||||
[
|
[
|
||||||
"Penumbra", "MareSynchronos", "CustomizePlus", "SimpleHeels", "VfxEditor", "heliosphere-plugin", "Ktisis", "Brio", "DynamicBridge",
|
"Penumbra", "MareSynchronos", "CustomizePlus", "SimpleHeels", "VfxEditor", "heliosphere-plugin", "Ktisis", "Brio", "DynamicBridge",
|
||||||
];
|
];
|
||||||
var plugins = _services.GetService<DalamudPluginInterface>().InstalledPlugins
|
var plugins = _services.GetService<IDalamudPluginInterface>().InstalledPlugins
|
||||||
.GroupBy(p => p.InternalName)
|
.GroupBy(p => p.InternalName)
|
||||||
.ToDictionary(g => g.Key, g =>
|
.ToDictionary(g => g.Key, g =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Dalamud.Interface.Internal;
|
using Dalamud.Interface.Internal;
|
||||||
|
using Dalamud.Interface.Textures;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Glamourer.GameData;
|
using Glamourer.GameData;
|
||||||
|
|
@ -13,7 +14,7 @@ using Penumbra.GameData.Structs;
|
||||||
namespace Glamourer.Gui.Customization;
|
namespace Glamourer.Gui.Customization;
|
||||||
|
|
||||||
public partial class CustomizationDrawer(
|
public partial class CustomizationDrawer(
|
||||||
DalamudPluginInterface pi,
|
IDalamudPluginInterface pi,
|
||||||
CustomizeService _service,
|
CustomizeService _service,
|
||||||
CodeService _codes,
|
CodeService _codes,
|
||||||
Configuration _config,
|
Configuration _config,
|
||||||
|
|
@ -22,7 +23,7 @@ public partial class CustomizationDrawer(
|
||||||
: IDisposable
|
: IDisposable
|
||||||
{
|
{
|
||||||
private readonly Vector4 _redTint = new(0.6f, 0.3f, 0.3f, 1f);
|
private readonly Vector4 _redTint = new(0.6f, 0.3f, 0.3f, 1f);
|
||||||
private readonly IDalamudTextureWrap? _legacyTattoo = GetLegacyTattooIcon(pi);
|
private readonly ISharedImmediateTexture? _legacyTattoo = GetLegacyTattooIcon(pi);
|
||||||
|
|
||||||
private Exception? _terminate;
|
private Exception? _terminate;
|
||||||
|
|
||||||
|
|
@ -190,7 +191,7 @@ public partial class CustomizationDrawer(
|
||||||
_raceSelectorWidth = _inputIntSize + _comboSelectorSize - _framedIconSize.X;
|
_raceSelectorWidth = _inputIntSize + _comboSelectorSize - _framedIconSize.X;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IDalamudTextureWrap? GetLegacyTattooIcon(DalamudPluginInterface pi)
|
private static ISharedImmediateTexture? GetLegacyTattooIcon(IDalamudPluginInterface pi)
|
||||||
{
|
{
|
||||||
using var resource = Assembly.GetExecutingAssembly().GetManifestResourceStream("Glamourer.LegacyTattoo.raw");
|
using var resource = Assembly.GetExecutingAssembly().GetManifestResourceStream("Glamourer.LegacyTattoo.raw");
|
||||||
if (resource == null)
|
if (resource == null)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
|
|
@ -64,7 +64,7 @@ public class MainWindow : Window, IDisposable
|
||||||
|
|
||||||
public TabType SelectTab;
|
public TabType SelectTab;
|
||||||
|
|
||||||
public MainWindow(DalamudPluginInterface pi, Configuration config, SettingsTab settings, ActorTab actors, DesignTab designs,
|
public MainWindow(IDalamudPluginInterface pi, Configuration config, SettingsTab settings, ActorTab actors, DesignTab designs,
|
||||||
DebugTab debugTab, AutomationTab automation, UnlocksTab unlocks, TabSelected @event, MessagesTab messages, DesignQuickBar quickBar,
|
DebugTab debugTab, AutomationTab automation, UnlocksTab unlocks, TabSelected @event, MessagesTab messages, DesignQuickBar quickBar,
|
||||||
NpcTab npcs, MainWindowPosition position, PenumbraService penumbra)
|
NpcTab npcs, MainWindowPosition position, PenumbraService penumbra)
|
||||||
: base("GlamourerMainWindow")
|
: base("GlamourerMainWindow")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using Dalamud.Game.ClientState.Conditions;
|
using Dalamud.Game.ClientState.Conditions;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||||
using Glamourer.Automation;
|
using Glamourer.Automation;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using OtterGui.Services;
|
||||||
|
|
||||||
namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
||||||
|
|
||||||
public class DesignIpcTester(DalamudPluginInterface pluginInterface) : IUiService
|
public class DesignIpcTester(IDalamudPluginInterface pluginInterface) : IUiService
|
||||||
{
|
{
|
||||||
private Dictionary<Guid, string> _designs = [];
|
private Dictionary<Guid, string> _designs = [];
|
||||||
private int _gameObjectIndex;
|
private int _gameObjectIndex;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using Penumbra.GameData.Gui.Debug;
|
||||||
namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
||||||
|
|
||||||
public class IpcTesterPanel(
|
public class IpcTesterPanel(
|
||||||
DalamudPluginInterface pluginInterface,
|
IDalamudPluginInterface pluginInterface,
|
||||||
DesignIpcTester designs,
|
DesignIpcTester designs,
|
||||||
ItemsIpcTester items,
|
ItemsIpcTester items,
|
||||||
StateIpcTester state,
|
StateIpcTester state,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ using Penumbra.GameData.Structs;
|
||||||
|
|
||||||
namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
||||||
|
|
||||||
public class ItemsIpcTester(DalamudPluginInterface pluginInterface) : IUiService
|
public class ItemsIpcTester(IDalamudPluginInterface pluginInterface) : IUiService
|
||||||
{
|
{
|
||||||
private int _gameObjectIndex;
|
private int _gameObjectIndex;
|
||||||
private string _gameObjectName = string.Empty;
|
private string _gameObjectName = string.Empty;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ namespace Glamourer.Gui.Tabs.DebugTab.IpcTester;
|
||||||
|
|
||||||
public class StateIpcTester : IUiService, IDisposable
|
public class StateIpcTester : IUiService, IDisposable
|
||||||
{
|
{
|
||||||
private readonly DalamudPluginInterface _pluginInterface;
|
private readonly IDalamudPluginInterface _pluginInterface;
|
||||||
|
|
||||||
private int _gameObjectIndex;
|
private int _gameObjectIndex;
|
||||||
private string _gameObjectName = string.Empty;
|
private string _gameObjectName = string.Empty;
|
||||||
|
|
@ -41,7 +41,7 @@ public class StateIpcTester : IUiService, IDisposable
|
||||||
|
|
||||||
private int _numUnlocked;
|
private int _numUnlocked;
|
||||||
|
|
||||||
public StateIpcTester(DalamudPluginInterface pluginInterface)
|
public StateIpcTester(IDalamudPluginInterface pluginInterface)
|
||||||
{
|
{
|
||||||
_pluginInterface = pluginInterface;
|
_pluginInterface = pluginInterface;
|
||||||
StateChanged = Api.IpcSubscribers.StateChangedWithType.Subscriber(_pluginInterface, OnStateChanged);
|
StateChanged = Api.IpcSubscribers.StateChangedWithType.Subscriber(_pluginInterface, OnStateChanged);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Events;
|
using Glamourer.Events;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.ImGuiFileDialog;
|
using Dalamud.Interface.ImGuiFileDialog;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||||
using Glamourer.Automation;
|
using Glamourer.Automation;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Interop;
|
using Glamourer.Interop;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
using FFXIVClientStructs.FFXIV.Client.Game.Object;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Gui.Customization;
|
using Glamourer.Gui.Customization;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class ContextMenuService : IDisposable
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private unsafe void OnMenuOpened(MenuOpenedArgs args)
|
private unsafe void OnMenuOpened(IMenuOpenedArgs args)
|
||||||
{
|
{
|
||||||
if (args.MenuType is ContextMenuType.Inventory)
|
if (args.MenuType is ContextMenuType.Inventory)
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +96,7 @@ public class ContextMenuService : IDisposable
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
=> Disable();
|
=> Disable();
|
||||||
|
|
||||||
private void OnClick(MenuItemClickedArgs _)
|
private void OnClick(IMenuItemClickedArgs _)
|
||||||
{
|
{
|
||||||
var (id, playerData) = _objects.PlayerData;
|
var (id, playerData) = _objects.PlayerData;
|
||||||
if (!playerData.Valid)
|
if (!playerData.Valid)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Interface.DragDrop;
|
using Dalamud.Interface.DragDrop;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Interop.CharaFile;
|
using Glamourer.Interop.CharaFile;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public class ObjectManager(
|
||||||
IFramework framework,
|
IFramework framework,
|
||||||
IClientState clientState,
|
IClientState clientState,
|
||||||
IObjectTable objects,
|
IObjectTable objects,
|
||||||
DalamudPluginInterface pi,
|
IDalamudPluginInterface pi,
|
||||||
Logger log,
|
Logger log,
|
||||||
ActorManager actors,
|
ActorManager actors,
|
||||||
ITargetManager targets)
|
ITargetManager targets)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ using OtterGui.Services;
|
||||||
|
|
||||||
namespace Glamourer.Interop.PalettePlus;
|
namespace Glamourer.Interop.PalettePlus;
|
||||||
|
|
||||||
public class PaletteImport(DalamudPluginInterface pluginInterface, DesignManager designManager, DesignFileSystem designFileSystem) : IService
|
public class PaletteImport(IDalamudPluginInterface pluginInterface, DesignManager designManager, DesignFileSystem designFileSystem) : IService
|
||||||
{
|
{
|
||||||
private string ConfigFile
|
private string ConfigFile
|
||||||
=> Path.Combine(Path.GetDirectoryName(pluginInterface.GetPluginConfigDirectory())!, "PalettePlus.json");
|
=> Path.Combine(Path.GetDirectoryName(pluginInterface.GetPluginConfigDirectory())!, "PalettePlus.json");
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using OtterGui.Services;
|
using OtterGui.Services;
|
||||||
|
|
@ -9,9 +9,9 @@ public sealed class PalettePlusChecker : IRequiredService, IDisposable
|
||||||
{
|
{
|
||||||
private readonly Timer _paletteTimer;
|
private readonly Timer _paletteTimer;
|
||||||
private readonly Configuration _config;
|
private readonly Configuration _config;
|
||||||
private readonly DalamudPluginInterface _pluginInterface;
|
private readonly IDalamudPluginInterface _pluginInterface;
|
||||||
|
|
||||||
public PalettePlusChecker(Configuration config, DalamudPluginInterface pluginInterface)
|
public PalettePlusChecker(Configuration config, IDalamudPluginInterface pluginInterface)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
_pluginInterface = pluginInterface;
|
_pluginInterface = pluginInterface;
|
||||||
|
|
@ -36,7 +36,7 @@ public sealed class PalettePlusChecker : IRequiredService, IDisposable
|
||||||
{
|
{
|
||||||
var subscriber = _pluginInterface.GetIpcSubscriber<string>("PalettePlus.ApiVersion");
|
var subscriber = _pluginInterface.GetIpcSubscriber<string>("PalettePlus.ApiVersion");
|
||||||
subscriber.InvokeFunc();
|
subscriber.InvokeFunc();
|
||||||
Glamourer.Messager.AddMessage(new Notification(
|
Glamourer.Messager.AddMessage(new OtterGui.Classes.Notification(
|
||||||
"You currently have Palette+ installed. This conflicts with Glamourers advanced options and will cause invalid state.\n\n"
|
"You currently have Palette+ installed. This conflicts with Glamourers advanced options and will cause invalid state.\n\n"
|
||||||
+ "Please uninstall Palette+ and restart your game. Palette+ is deprecated and no longer supported by Mare Synchronos.",
|
+ "Please uninstall Palette+ and restart your game. Palette+ is deprecated and no longer supported by Mare Synchronos.",
|
||||||
NotificationType.Warning, 10000));
|
NotificationType.Warning, 10000));
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Glamourer.Events;
|
using Glamourer.Events;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
|
|
@ -36,7 +36,7 @@ public unsafe class PenumbraService : IDisposable
|
||||||
public const int RequiredPenumbraBreakingVersion = 5;
|
public const int RequiredPenumbraBreakingVersion = 5;
|
||||||
public const int RequiredPenumbraFeatureVersion = 0;
|
public const int RequiredPenumbraFeatureVersion = 0;
|
||||||
|
|
||||||
private readonly DalamudPluginInterface _pluginInterface;
|
private readonly IDalamudPluginInterface _pluginInterface;
|
||||||
private readonly EventSubscriber<ChangedItemType, uint> _tooltipSubscriber;
|
private readonly EventSubscriber<ChangedItemType, uint> _tooltipSubscriber;
|
||||||
private readonly EventSubscriber<MouseButton, ChangedItemType, uint> _clickSubscriber;
|
private readonly EventSubscriber<MouseButton, ChangedItemType, uint> _clickSubscriber;
|
||||||
private readonly EventSubscriber<nint, Guid, nint, nint, nint> _creatingCharacterBase;
|
private readonly EventSubscriber<nint, Guid, nint, nint, nint> _creatingCharacterBase;
|
||||||
|
|
@ -68,7 +68,7 @@ public unsafe class PenumbraService : IDisposable
|
||||||
public int CurrentMinor { get; private set; }
|
public int CurrentMinor { get; private set; }
|
||||||
public DateTime AttachTime { get; private set; }
|
public DateTime AttachTime { get; private set; }
|
||||||
|
|
||||||
public PenumbraService(DalamudPluginInterface pi, PenumbraReloaded penumbraReloaded)
|
public PenumbraService(IDalamudPluginInterface pi, PenumbraReloaded penumbraReloaded)
|
||||||
{
|
{
|
||||||
_pluginInterface = pi;
|
_pluginInterface = pi;
|
||||||
_penumbraReloaded = penumbraReloaded;
|
_penumbraReloaded = penumbraReloaded;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public unsafe class ScalingService : IDisposable
|
||||||
{
|
{
|
||||||
interop.InitializeFromAttributes(this);
|
interop.InitializeFromAttributes(this);
|
||||||
_setupMountHook =
|
_setupMountHook =
|
||||||
interop.HookFromAddress<SetupMount>((nint)Character.MountContainer.MemberFunctionPointers.SetupMount, SetupMountDetour);
|
interop.HookFromAddress<SetupMount>(MountContainer.MemberFunctionPointers.SetupMount, SetupMountDetour);
|
||||||
_setupOrnamentHook = interop.HookFromAddress<SetupOrnament>((nint)Ornament.MemberFunctionPointers.SetupOrnament, SetupOrnamentDetour);
|
_setupOrnamentHook = interop.HookFromAddress<SetupOrnament>((nint)Ornament.MemberFunctionPointers.SetupOrnament, SetupOrnamentDetour);
|
||||||
_calculateHeightHook =
|
_calculateHeightHook =
|
||||||
interop.HookFromAddress<CalculateHeight>((nint)Character.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour);
|
interop.HookFromAddress<CalculateHeight>((nint)Character.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour);
|
||||||
|
|
@ -33,7 +33,7 @@ public unsafe class ScalingService : IDisposable
|
||||||
_calculateHeightHook.Dispose();
|
_calculateHeightHook.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private delegate void SetupMount(Character.MountContainer* container, short mountId, uint unk1, uint unk2, uint unk3, byte unk4);
|
private delegate void SetupMount(MountContainer* container, short mountId, uint unk1, uint unk2, uint unk3, byte unk4);
|
||||||
private delegate void SetupOrnament(Ornament* ornament, uint* unk1, float* unk2);
|
private delegate void SetupOrnament(Ornament* ornament, uint* unk1, float* unk2);
|
||||||
private delegate void PlaceMinion(Companion* character);
|
private delegate void PlaceMinion(Companion* character);
|
||||||
private delegate float CalculateHeight(Character* character);
|
private delegate float CalculateHeight(Character* character);
|
||||||
|
|
@ -48,7 +48,7 @@ public unsafe class ScalingService : IDisposable
|
||||||
[Signature("48 89 5C 24 ?? 55 57 41 57 48 8D 6C 24", DetourName = nameof(PlaceMinionDetour))]
|
[Signature("48 89 5C 24 ?? 55 57 41 57 48 8D 6C 24", DetourName = nameof(PlaceMinionDetour))]
|
||||||
private readonly Hook<PlaceMinion> _placeMinionHook = null!;
|
private readonly Hook<PlaceMinion> _placeMinionHook = null!;
|
||||||
|
|
||||||
private void SetupMountDetour(Character.MountContainer* container, short mountId, uint unk1, uint unk2, uint unk3, byte unk4)
|
private void SetupMountDetour(MountContainer* container, short mountId, uint unk1, uint unk2, uint unk3, byte unk4)
|
||||||
{
|
{
|
||||||
var (race, clan, gender) = GetScaleRelevantCustomize(&container->OwnerObject->Character);
|
var (race, clan, gender) = GetScaleRelevantCustomize(&container->OwnerObject->Character);
|
||||||
SetScaleCustomize(&container->OwnerObject->Character, container->OwnerObject->Character.GameObject.DrawObject);
|
SetScaleCustomize(&container->OwnerObject->Character, container->OwnerObject->Character.GameObject.DrawObject);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Interop.Penumbra;
|
using Glamourer.Interop.Penumbra;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Glamourer.Services;
|
||||||
|
|
||||||
public class DalamudServices
|
public class DalamudServices
|
||||||
{
|
{
|
||||||
public static void AddServices(ServiceManager services, DalamudPluginInterface pi)
|
public static void AddServices(ServiceManager services, IDalamudPluginInterface pi)
|
||||||
{
|
{
|
||||||
services.AddExistingService(pi);
|
services.AddExistingService(pi);
|
||||||
services.AddExistingService(pi.UiBuilder);
|
services.AddExistingService(pi.UiBuilder);
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public class FilenameService
|
||||||
public readonly string NpcAppearanceFile;
|
public readonly string NpcAppearanceFile;
|
||||||
public readonly string CollectionOverrideFile;
|
public readonly string CollectionOverrideFile;
|
||||||
|
|
||||||
public FilenameService(DalamudPluginInterface pi)
|
public FilenameService(IDalamudPluginInterface pi)
|
||||||
{
|
{
|
||||||
ConfigDirectory = pi.ConfigDirectory.FullName;
|
ConfigDirectory = pi.ConfigDirectory.FullName;
|
||||||
ConfigFile = pi.ConfigFile.FullName;
|
ConfigFile = pi.ConfigFile.FullName;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace Glamourer.Services;
|
||||||
|
|
||||||
public static class StaticServiceManager
|
public static class StaticServiceManager
|
||||||
{
|
{
|
||||||
public static ServiceManager CreateProvider(DalamudPluginInterface pi, Logger log, Glamourer glamourer)
|
public static ServiceManager CreateProvider(IDalamudPluginInterface pi, Logger log, Glamourer glamourer)
|
||||||
{
|
{
|
||||||
EventWrapperBase.ChangeLogger(log);
|
EventWrapperBase.ChangeLogger(log);
|
||||||
var services = new ServiceManager(log)
|
var services = new ServiceManager(log)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using Dalamud.Interface.Internal;
|
using Dalamud.Interface.Internal;
|
||||||
|
using Dalamud.Interface.Textures;
|
||||||
|
using Dalamud.Interface.Textures.TextureWraps;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
|
@ -10,7 +12,7 @@ namespace Glamourer.Services;
|
||||||
public sealed class TextureService(UiBuilder uiBuilder, IDataManager dataManager, ITextureProvider textureProvider)
|
public sealed class TextureService(UiBuilder uiBuilder, IDataManager dataManager, ITextureProvider textureProvider)
|
||||||
: TextureCache(dataManager, textureProvider), IDisposable
|
: TextureCache(dataManager, textureProvider), IDisposable
|
||||||
{
|
{
|
||||||
private readonly IDalamudTextureWrap?[] _slotIcons = CreateSlotIcons(uiBuilder);
|
private readonly ISharedImmediateTexture?[] _slotIcons = CreateSlotIcons(uiBuilder);
|
||||||
|
|
||||||
public (nint, Vector2, bool) GetIcon(EquipItem item, EquipSlot slot)
|
public (nint, Vector2, bool) GetIcon(EquipItem item, EquipSlot slot)
|
||||||
{
|
{
|
||||||
|
|
@ -32,9 +34,9 @@ public sealed class TextureService(UiBuilder uiBuilder, IDataManager dataManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IDalamudTextureWrap?[] CreateSlotIcons(UiBuilder uiBuilder)
|
private static ISharedImmediateTexture?[] CreateSlotIcons(UiBuilder uiBuilder)
|
||||||
{
|
{
|
||||||
var ret = new IDalamudTextureWrap?[12];
|
var ret = new ISharedImmediateTexture?[12];
|
||||||
|
|
||||||
using var uldWrapper = uiBuilder.LoadUld("ui/uld/ArmouryBoard.uld");
|
using var uldWrapper = uiBuilder.LoadUld("ui/uld/ArmouryBoard.uld");
|
||||||
|
|
||||||
|
|
@ -63,7 +65,7 @@ public sealed class TextureService(UiBuilder uiBuilder, IDataManager dataManager
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ret[slot.ToIndex()] = uldWrapper.LoadTexturePart("ui/uld/ArmouryBoard_hr1.tex", index)!;
|
ret[slot.ToIndex()] = (ISharedImmediateTexture?)uldWrapper.LoadTexturePart("ui/uld/ArmouryBoard_hr1.tex", index)!;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using Dalamud.Game.ClientState.Objects.Enums;
|
using Dalamud.Game.ClientState.Objects.Enums;
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Gui;
|
using Glamourer.Gui;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
|
|
@ -198,7 +198,7 @@ public unsafe class FunModule : IDisposable
|
||||||
|
|
||||||
private static bool ValidFunTarget(Actor actor)
|
private static bool ValidFunTarget(Actor actor)
|
||||||
=> actor.IsCharacter
|
=> actor.IsCharacter
|
||||||
&& actor.AsObject->ObjectKind is (byte)ObjectKind.Player
|
&& actor.AsObject->ObjectKind is (FFXIVClientStructs.FFXIV.Client.Game.Object.ObjectKind)(byte)ObjectKind.Player
|
||||||
&& !actor.IsTransformed
|
&& !actor.IsTransformed
|
||||||
&& actor.AsCharacter->CharacterData.ModelCharaId == 0;
|
&& actor.AsCharacter->CharacterData.ModelCharaId == 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Dalamud.Interface.Internal.Notifications;
|
using Dalamud.Interface.ImGuiNotification;
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
|
|
||||||
namespace Glamourer.Unlocks;
|
namespace Glamourer.Unlocks;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue