From 8242152eb46f3f7ef9834269bf6389e1e6daf15e Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 27 Sep 2023 22:13:32 -0400 Subject: [PATCH] refactor: update for api 9 --- TheHeartOfTheParty/Commands.cs | 2 +- TheHeartOfTheParty/GameFunctions.cs | 2 +- TheHeartOfTheParty/Plugin.cs | 17 +++++++++-------- TheHeartOfTheParty/PluginUi.cs | 2 +- TheHeartOfTheParty/TheHeartOfTheParty.csproj | 4 ++-- TheHeartOfTheParty/TheHeartOfTheParty.yaml | 4 ++-- TheHeartOfTheParty/packages.lock.json | 8 ++++---- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/TheHeartOfTheParty/Commands.cs b/TheHeartOfTheParty/Commands.cs index a9f7a63..00bfee0 100644 --- a/TheHeartOfTheParty/Commands.cs +++ b/TheHeartOfTheParty/Commands.cs @@ -15,7 +15,7 @@ internal class Commands : IDisposable { foreach (var name in CommandNames) { this.Plugin.CommandManager.AddHandler(name, new CommandInfo(this.OnCommand) { - HelpMessage = $"Toggles {this.Plugin.Name}", + HelpMessage = $"Toggles {Plugin.Name}", }); } } diff --git a/TheHeartOfTheParty/GameFunctions.cs b/TheHeartOfTheParty/GameFunctions.cs index 173f825..cf2f1c4 100755 --- a/TheHeartOfTheParty/GameFunctions.cs +++ b/TheHeartOfTheParty/GameFunctions.cs @@ -22,7 +22,7 @@ internal unsafe class GameFunctions { private uint _agentId; internal GameFunctions() { - SignatureHelper.Initialise(this); + Plugin.GameInteropProvider.InitializeFromAttributes(this); } internal void RequestTitles() { diff --git a/TheHeartOfTheParty/Plugin.cs b/TheHeartOfTheParty/Plugin.cs index 530ae1c..ed91385 100755 --- a/TheHeartOfTheParty/Plugin.cs +++ b/TheHeartOfTheParty/Plugin.cs @@ -1,25 +1,26 @@ -using Dalamud.Data; -using Dalamud.Game.ClientState; -using Dalamud.Game.Command; -using Dalamud.IoC; +using Dalamud.IoC; using Dalamud.Plugin; +using Dalamud.Plugin.Services; namespace TheHeartOfTheParty; public class Plugin : IDalamudPlugin { - public string Name => "The Heart of the Party"; + internal static string Name => "The Heart of the Party"; + + [PluginService] + internal static IGameInteropProvider GameInteropProvider { get; private set; } [PluginService] internal DalamudPluginInterface Interface { get; init; } [PluginService] - internal ClientState ClientState { get; init; } + internal IClientState ClientState { get; init; } [PluginService] - internal CommandManager CommandManager { get; init; } + internal ICommandManager CommandManager { get; init; } [PluginService] - internal DataManager DataManager { get; init; } + internal IDataManager DataManager { get; init; } internal Configuration Config { get; } internal GameFunctions Functions { get; } diff --git a/TheHeartOfTheParty/PluginUi.cs b/TheHeartOfTheParty/PluginUi.cs index 206d13e..e2c680e 100755 --- a/TheHeartOfTheParty/PluginUi.cs +++ b/TheHeartOfTheParty/PluginUi.cs @@ -42,7 +42,7 @@ internal class PluginUi : IDisposable { ImGui.SetNextWindowSize(new Vector2(780, 450), ImGuiCond.FirstUseEver); - if (!ImGui.Begin(this.Plugin.Name, ref this._visible)) { + if (!ImGui.Begin(Plugin.Name, ref this._visible)) { ImGui.End(); return; } diff --git a/TheHeartOfTheParty/TheHeartOfTheParty.csproj b/TheHeartOfTheParty/TheHeartOfTheParty.csproj index 7427034..a6cab54 100755 --- a/TheHeartOfTheParty/TheHeartOfTheParty.csproj +++ b/TheHeartOfTheParty/TheHeartOfTheParty.csproj @@ -2,7 +2,7 @@ 1.0.4 - net6-windows + net7-windows enable enable true @@ -48,7 +48,7 @@ - + diff --git a/TheHeartOfTheParty/TheHeartOfTheParty.yaml b/TheHeartOfTheParty/TheHeartOfTheParty.yaml index dfef863..0f3990c 100644 --- a/TheHeartOfTheParty/TheHeartOfTheParty.yaml +++ b/TheHeartOfTheParty/TheHeartOfTheParty.yaml @@ -1,8 +1,8 @@ name: The Heart of the Party -author: ascclemens +author: Anna punchline: Set your character's title - now with Searchalin! description: |- The Heart of the Party is a remake of the in-game title picker, but it supports searching. Note that it doesn't add a command to set your title; use the built-in /title command instead. -repo_url: https://git.annaclemens.io/ascclemens/TheHeartOfTheParty +repo_url: https://git.anna.lgbt/anna/TheHeartOfTheParty diff --git a/TheHeartOfTheParty/packages.lock.json b/TheHeartOfTheParty/packages.lock.json index 9628a11..467f0f2 100644 --- a/TheHeartOfTheParty/packages.lock.json +++ b/TheHeartOfTheParty/packages.lock.json @@ -1,12 +1,12 @@ { "version": 1, "dependencies": { - "net6.0-windows7.0": { + "net7.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.8, )", - "resolved": "2.1.8", - "contentHash": "YqagNXs9InxmqkXzq7kLveImxnodkBEicAhydMXVp7dFjC7xb76U6zGgAax4/BWIWfZeWzr5DJyQSev31kj81A==" + "requested": "[2.1.11, )", + "resolved": "2.1.11", + "contentHash": "9qlAWoRRTiL/geAvuwR/g6Bcbrd/bJJgVnB/RurBiyKs6srsP0bvpoo8IK+Eg8EA6jWeM6/YJWs66w4FIAzqPw==" } } }