Continuing work on the IPC

ArmatureChanged.Type.Rebound -> Updated
IsPendingProfileRebind is now being set instead of calling RebuildBoneTemplateBinding and that function is called as a part of rebind process (not always though, pending rewrite)
Profiles can no longer be toggled in the UI while editor is active
ProfileChanged is no longer used in IPC, instead we are fully relying on armature events
Added warnings to legacy IPC messages to not use it
This commit is contained in:
RisaDev
2024-03-24 23:45:28 +03:00
parent 3a74a50e39
commit 6777f9db6e
9 changed files with 72 additions and 68 deletions

View File

@@ -18,7 +18,6 @@ public partial class CustomizePlusIpc : IDisposable
private readonly ProfileManager _profileManager;
private readonly GameObjectService _gameObjectService;
private readonly ProfileChanged _profileChangedEvent;
private readonly ArmatureChanged _armatureChangedEvent;
/// <summary>
@@ -32,8 +31,7 @@ public partial class CustomizePlusIpc : IDisposable
HookingService hookingService,
ProfileManager profileManager,
GameObjectService gameObjectService,
ArmatureChanged armatureChangedEvent,
ProfileChanged profileChangedEvent)
ArmatureChanged armatureChangedEvent)
{
_pluginInterface = pluginInterface;
_logger = logger;
@@ -41,19 +39,15 @@ public partial class CustomizePlusIpc : IDisposable
_profileManager = profileManager;
_gameObjectService = gameObjectService;
_profileChangedEvent = profileChangedEvent;
_armatureChangedEvent = armatureChangedEvent;
EzIPC.Init(this, "CustomizePlus");
_profileChangedEvent.Subscribe(OnProfileChange, ProfileChanged.Priority.CustomizePlusIpc);
_armatureChangedEvent.Subscribe(OnArmatureChanged, ArmatureChanged.Priority.CustomizePlusIpc);
}
public void Dispose()
{
_profileChangedEvent.Unsubscribe(OnProfileChange);
_armatureChangedEvent.Unsubscribe(OnArmatureChanged);
}
}