Add basic Glamourer IPC

This commit is contained in:
Stanley Dimant 2022-06-14 14:37:48 +02:00
parent e4e9ed81b8
commit 7d6e1323f4
2 changed files with 91 additions and 1 deletions

View file

@ -4,6 +4,7 @@ using System.Reflection;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.Command;
using Dalamud.Plugin;
using Glamourer.Api;
using Glamourer.Customization;
using Glamourer.Designs;
using Glamourer.FileSystem;
@ -27,6 +28,7 @@ namespace Glamourer
public readonly DesignManager Designs;
public readonly FixedDesigns FixedDesigns;
public static RevertableDesigns RevertableDesigns = new();
public readonly GlamourerIpc GlamourerIpc;
public static string Version = string.Empty;
@ -41,6 +43,7 @@ namespace Glamourer
Designs = new DesignManager();
Penumbra = new PenumbraAttach(Config.AttachToPenumbra);
PlayerWatcher = PlayerWatchFactory.Create(Dalamud.Framework, Dalamud.ClientState, Dalamud.Objects);
GlamourerIpc = new(Dalamud.Objects, pluginInterface);
if (!Config.ApplyFixedDesigns)
PlayerWatcher.Disable();
@ -61,7 +64,7 @@ namespace Glamourer
public void OnGlamourer(string command, string arguments)
=> _interface.ToggleVisibility();
private static GameObject? GetPlayer(string name)
public static GameObject? GetPlayer(string name)
{
var lowerName = name.ToLowerInvariant();
return lowerName switch