listen to glamourer changes

This commit is contained in:
rootdarkarchon
2024-01-13 00:00:52 +01:00
committed by Loporrit
parent 06f6b75e72
commit 0cd953f514
4 changed files with 37 additions and 1 deletions

View File

@@ -114,6 +114,8 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
_glamourerRevertByName = pi.GetIpcSubscriber<string, uint, object?>("Glamourer.RevertLock");
_glamourerUnlock = pi.GetIpcSubscriber<string, uint, bool>("Glamourer.UnlockName");
pi.GetIpcSubscriber<int, nint, Lazy<string>, object?>("Glamourer.StateChanged").Subscribe((type, address, customize) => GlamourerChanged(address));
_heelsGetApiVersion = pi.GetIpcSubscriber<(int, int)>("SimpleHeels.ApiVersion");
_heelsGetOffset = pi.GetIpcSubscriber<string>("SimpleHeels.GetLocalPlayer");
_heelsRegisterPlayer = pi.GetIpcSubscriber<GameObject, string, object?>("SimpleHeels.RegisterPlayer");
@@ -755,6 +757,11 @@ public sealed class IpcManager : DisposableMediatorSubscriberBase
return _penumbraResolveModDir!.Invoke().ToLowerInvariant();
}
private void GlamourerChanged(nint address)
{
Mediator.Publish(new GlamourerChangedMessage(address));
}
private void HeelsOffsetChange(string offset)
{
Mediator.Publish(new HeelsOffsetMessage());