mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:27:21 +01:00
improve logging/error display for lack of penumbra or glamourer
This commit is contained in:
parent
0c47bf8ccd
commit
c67add20d6
7 changed files with 60 additions and 10 deletions
|
|
@ -10,7 +10,7 @@ using Microsoft.Extensions.Logging;
|
|||
|
||||
namespace MareSynchronos.Interop.Ipc;
|
||||
|
||||
public sealed class IpcCallerGlamourer : IIpcCaller
|
||||
public sealed class IpcCallerGlamourer : DisposableMediatorSubscriberBase, IIpcCaller
|
||||
{
|
||||
private readonly ILogger<IpcCallerGlamourer> _logger;
|
||||
private readonly IDalamudPluginInterface _pi;
|
||||
|
|
@ -31,7 +31,7 @@ public sealed class IpcCallerGlamourer : IIpcCaller
|
|||
private readonly uint LockCode = 0x6D617265;
|
||||
|
||||
public IpcCallerGlamourer(ILogger<IpcCallerGlamourer> logger, IDalamudPluginInterface pi, DalamudUtilService dalamudUtil, MareMediator mareMediator,
|
||||
RedrawManager redrawManager)
|
||||
RedrawManager redrawManager) : base(logger, mareMediator)
|
||||
{
|
||||
_glamourerApiVersions = new ApiVersion(pi);
|
||||
_glamourerGetAllCustomization = new GetStateBase64(pi);
|
||||
|
|
@ -50,6 +50,15 @@ public sealed class IpcCallerGlamourer : IIpcCaller
|
|||
|
||||
_glamourerStateChanged = StateChanged.Subscriber(pi, GlamourerChanged);
|
||||
_glamourerStateChanged.Enable();
|
||||
|
||||
Mediator.Subscribe<DalamudLoginMessage>(this, s => _shownGlamourerUnavailable = false);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
_redrawManager.Cancel();
|
||||
}
|
||||
|
||||
public bool APIAvailable { get; private set; }
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ public sealed class IpcCallerPenumbra : DisposableMediatorSubscriberBase, IIpcCa
|
|||
{
|
||||
_penumbraRedraw.Invoke(msg.Character.ObjectIndex, RedrawType.AfterGPose);
|
||||
});
|
||||
|
||||
Mediator.Subscribe<DalamudLoginMessage>(this, (msg) => _shownPenumbraUnavailable = false);
|
||||
}
|
||||
|
||||
public bool APIAvailable { get; private set; } = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue