From 030cb235f1ba75927173c52307e4dd5263d9edc6 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 9 Nov 2023 11:25:09 +0100 Subject: [PATCH] Use AutoRetainerAPI as submodule --- .gitmodules | 6 ++++++ ARDiscard.sln | 12 ++++++++++++ ARDiscard/ARDiscard.csproj | 12 ++---------- ARDiscard/AutoDiscardPlogon.cs | 3 +-- ARDiscard/packages.lock.json | 9 +++++++++ AutoRetainerAPI | 1 + ECommons | 1 + 7 files changed, 32 insertions(+), 12 deletions(-) create mode 160000 AutoRetainerAPI create mode 160000 ECommons diff --git a/.gitmodules b/.gitmodules index 4ac68e0..c62c119 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "LLib"] path = LLib url = https://git.carvel.li/liza/LLib.git +[submodule "AutoRetainerAPI"] + path = AutoRetainerAPI + url = https://github.com/PunishXIV/AutoRetainerAPI.git +[submodule "ECommons"] + path = ECommons + url = https://github.com/NightmareXIV/ECommons.git diff --git a/ARDiscard.sln b/ARDiscard.sln index 351049b..ecaf976 100644 --- a/ARDiscard.sln +++ b/ARDiscard.sln @@ -4,6 +4,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARDiscard", "ARDiscard\ARDi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLib", "LLib\LLib.csproj", "{2E159617-A667-4EC8-B3A8-8B087315C181}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRetainerAPI", "AutoRetainerAPI\AutoRetainerAPI\AutoRetainerAPI.csproj", "{265C467A-3687-42AE-A178-CA7186852B38}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ECommons", "ECommons\ECommons\ECommons.csproj", "{F4483C28-62CF-4EB2-A51E-FF0CF4B1E727}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -18,5 +22,13 @@ Global {2E159617-A667-4EC8-B3A8-8B087315C181}.Debug|Any CPU.Build.0 = Debug|Any CPU {2E159617-A667-4EC8-B3A8-8B087315C181}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E159617-A667-4EC8-B3A8-8B087315C181}.Release|Any CPU.Build.0 = Release|Any CPU + {265C467A-3687-42AE-A178-CA7186852B38}.Debug|Any CPU.ActiveCfg = Debug|x64 + {265C467A-3687-42AE-A178-CA7186852B38}.Debug|Any CPU.Build.0 = Debug|x64 + {265C467A-3687-42AE-A178-CA7186852B38}.Release|Any CPU.ActiveCfg = Release|x64 + {265C467A-3687-42AE-A178-CA7186852B38}.Release|Any CPU.Build.0 = Release|x64 + {F4483C28-62CF-4EB2-A51E-FF0CF4B1E727}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F4483C28-62CF-4EB2-A51E-FF0CF4B1E727}.Debug|Any CPU.Build.0 = Debug|x64 + {F4483C28-62CF-4EB2-A51E-FF0CF4B1E727}.Release|Any CPU.ActiveCfg = Release|x64 + {F4483C28-62CF-4EB2-A51E-FF0CF4B1E727}.Release|Any CPU.Build.0 = Release|x64 EndGlobalSection EndGlobal diff --git a/ARDiscard/ARDiscard.csproj b/ARDiscard/ARDiscard.csproj index 904f66e..860d7c7 100644 --- a/ARDiscard/ARDiscard.csproj +++ b/ARDiscard/ARDiscard.csproj @@ -17,7 +17,6 @@ $(appdata)\XIVLauncher\addon\Hooks\dev\ - $(appdata)\XIVLauncher\installedPlugins\AutoRetainer\4.2.1.1\ @@ -25,6 +24,8 @@ + + @@ -58,15 +59,6 @@ $(DalamudLibPath)FFXIVClientStructs.dll false - - $(AutoRetainerLibPath)AutoRetainerAPI.dll - - - $(AutoRetainerLibPath)ECommons.dll - - - $(AutoRetainerLibPath)ClickLib.dll - diff --git a/ARDiscard/AutoDiscardPlogon.cs b/ARDiscard/AutoDiscardPlogon.cs index 335e558..9b6e6c7 100644 --- a/ARDiscard/AutoDiscardPlogon.cs +++ b/ARDiscard/AutoDiscardPlogon.cs @@ -4,7 +4,6 @@ using System.Linq; using ARDiscard.GameData; using ARDiscard.Windows; using AutoRetainerAPI; -using ClickLib.Clicks; using Dalamud.Game.Command; using Dalamud.Interface.Windowing; using Dalamud.Memory; @@ -184,7 +183,7 @@ public class AutoDiscardPlogon : IDalamudPlugin { _pluginLog.Information("Addon is visible, clicking 'yes'"); ((AddonSelectYesno*)addon)->YesButton->AtkComponentBase.SetEnabledState(true); - ClickSelectYesNo.Using((nint)addon).Yes(); + addon->FireCallbackInt(0); _taskManager.DelayNext(20); _taskManager.Enqueue(() => ContinueAfterDiscard(type, itemFilter, inventoryType, slot)); diff --git a/ARDiscard/packages.lock.json b/ARDiscard/packages.lock.json index fda2df7..b6487cf 100644 --- a/ARDiscard/packages.lock.json +++ b/ARDiscard/packages.lock.json @@ -14,6 +14,15 @@ "resolved": "2.1.12", "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" }, + "autoretainerapi": { + "type": "Project", + "dependencies": { + "ECommons": "[2.1.0, )" + } + }, + "ecommons": { + "type": "Project" + }, "llib": { "type": "Project" } diff --git a/AutoRetainerAPI b/AutoRetainerAPI new file mode 160000 index 0000000..7cb5477 --- /dev/null +++ b/AutoRetainerAPI @@ -0,0 +1 @@ +Subproject commit 7cb54772e3a4a60ad02520e898d1ed0e82b2a751 diff --git a/ECommons b/ECommons new file mode 160000 index 0000000..f1c688a --- /dev/null +++ b/ECommons @@ -0,0 +1 @@ +Subproject commit f1c688a0599b41d70230021328a575da7351cf91