Chara file data export (#38)
* add rudimentary saving of chara file data * fix building * working prototype for MCDF import and application * adjust code to use streams * rename cache -> storage add ui for import/export mcdf * minor wording adjustments, version bump Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com> Co-authored-by: Stanley Dimant <stanley.dimant@varian.com>
This commit is contained in:
@@ -57,7 +57,10 @@ public class IpcManager : IDisposable
|
||||
private readonly ICallGateSubscriber<string?, object> _customizePlusOnScaleUpdate;
|
||||
|
||||
private readonly DalamudUtil _dalamudUtil;
|
||||
private readonly ConcurrentQueue<Action> actionQueue = new();
|
||||
private bool inGposeQueueMode = false;
|
||||
private ConcurrentQueue<Action> actionQueue => inGposeQueueMode ? gposeActionQueue : normalQueue;
|
||||
private readonly ConcurrentQueue<Action> normalQueue = new();
|
||||
private readonly ConcurrentQueue<Action> gposeActionQueue = new();
|
||||
|
||||
public IpcManager(DalamudPluginInterface pi, DalamudUtil dalamudUtil)
|
||||
{
|
||||
@@ -112,9 +115,25 @@ public class IpcManager : IDisposable
|
||||
|
||||
_dalamudUtil = dalamudUtil;
|
||||
_dalamudUtil.FrameworkUpdate += HandleActionQueue;
|
||||
_dalamudUtil.GposeFrameworkUpdate += HandleGposeActionQueue;
|
||||
_dalamudUtil.ZoneSwitchEnd += ClearActionQueue;
|
||||
}
|
||||
|
||||
private void HandleGposeActionQueue()
|
||||
{
|
||||
if (gposeActionQueue.TryDequeue(out var action))
|
||||
{
|
||||
if (action == null) return;
|
||||
Logger.Debug("Execution action in gpose queue: " + action.Method);
|
||||
action();
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleGposeQueueMode(bool on)
|
||||
{
|
||||
inGposeQueueMode = on;
|
||||
}
|
||||
|
||||
private void PenumbraModSettingChangedHandler()
|
||||
{
|
||||
PenumbraModSettingChanged?.Invoke();
|
||||
@@ -123,6 +142,7 @@ public class IpcManager : IDisposable
|
||||
private void ClearActionQueue()
|
||||
{
|
||||
actionQueue.Clear();
|
||||
gposeActionQueue.Clear();
|
||||
}
|
||||
|
||||
private void ResourceLoaded(IntPtr ptr, string arg1, string arg2)
|
||||
@@ -223,6 +243,7 @@ public class IpcManager : IDisposable
|
||||
|
||||
_dalamudUtil.FrameworkUpdate -= HandleActionQueue;
|
||||
_dalamudUtil.ZoneSwitchEnd -= ClearActionQueue;
|
||||
_dalamudUtil.GposeFrameworkUpdate -= HandleGposeActionQueue;
|
||||
actionQueue.Clear();
|
||||
|
||||
_penumbraGameObjectResourcePathResolved.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user