From 30d9522da8997fac6a4bd36d01c3e450f1106030 Mon Sep 17 00:00:00 2001 From: RisaDev <151885272+RisaDev@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:18:26 +0300 Subject: [PATCH] Removed a bit too much --- .../MainWindow/Tabs/Debug/IPCTestTab.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs index b78b511..709241e 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs @@ -20,6 +20,7 @@ using IPCProfileDataTuple = (System.Guid UniqueId, string Name, string VirtualPa using OtterGui.Log; using CustomizePlus.Core.Extensions; using CustomizePlus.Configuration.Data; +using CustomizePlus.Api.Data; namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Debug; @@ -147,6 +148,23 @@ public class IPCTestTab //: IDisposable ImGui.SameLine(); ImGui.InputText("##operateon", ref _targetCharacterName, 128); + if (ImGui.Button("Copy current profile into memory")) + { + var actors = _gameObjectService.FindActorsByName(_targetCharacterName).ToList(); + if (actors.Count == 0) + return; + + if (!actors[0].Item2.Identifier(_actorManager, out var identifier)) + return; + + var profile = _profileManager.GetEnabledProfilesByActor(identifier).FirstOrDefault(); + if (profile == null) + return; + + _rememberedProfileJson = JsonConvert.SerializeObject(IPCCharacterProfile.FromFullProfile(profile)); + _popupSystem.ShowPopup(PopupSystem.Messages.IPCProfileRemembered); + } + if (ImGui.Button("GetActiveProfileIdOnCharacter into clipboard")) { var actors = _gameObjectService.FindActorsByName(_targetCharacterName).ToList();