refactor: update for api 9

This commit is contained in:
Anna 2023-09-27 22:13:32 -04:00
parent 389691517a
commit 8242152eb4
Signed by: anna
GPG Key ID: D0943384CD9F87D1
7 changed files with 20 additions and 19 deletions

View File

@ -15,7 +15,7 @@ internal class Commands : IDisposable {
foreach (var name in CommandNames) { foreach (var name in CommandNames) {
this.Plugin.CommandManager.AddHandler(name, new CommandInfo(this.OnCommand) { this.Plugin.CommandManager.AddHandler(name, new CommandInfo(this.OnCommand) {
HelpMessage = $"Toggles {this.Plugin.Name}", HelpMessage = $"Toggles {Plugin.Name}",
}); });
} }
} }

View File

@ -22,7 +22,7 @@ internal unsafe class GameFunctions {
private uint _agentId; private uint _agentId;
internal GameFunctions() { internal GameFunctions() {
SignatureHelper.Initialise(this); Plugin.GameInteropProvider.InitializeFromAttributes(this);
} }
internal void RequestTitles() { internal void RequestTitles() {

View File

@ -1,25 +1,26 @@
using Dalamud.Data; using Dalamud.IoC;
using Dalamud.Game.ClientState;
using Dalamud.Game.Command;
using Dalamud.IoC;
using Dalamud.Plugin; using Dalamud.Plugin;
using Dalamud.Plugin.Services;
namespace TheHeartOfTheParty; namespace TheHeartOfTheParty;
public class Plugin : IDalamudPlugin { 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] [PluginService]
internal DalamudPluginInterface Interface { get; init; } internal DalamudPluginInterface Interface { get; init; }
[PluginService] [PluginService]
internal ClientState ClientState { get; init; } internal IClientState ClientState { get; init; }
[PluginService] [PluginService]
internal CommandManager CommandManager { get; init; } internal ICommandManager CommandManager { get; init; }
[PluginService] [PluginService]
internal DataManager DataManager { get; init; } internal IDataManager DataManager { get; init; }
internal Configuration Config { get; } internal Configuration Config { get; }
internal GameFunctions Functions { get; } internal GameFunctions Functions { get; }

View File

@ -42,7 +42,7 @@ internal class PluginUi : IDisposable {
ImGui.SetNextWindowSize(new Vector2(780, 450), ImGuiCond.FirstUseEver); 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(); ImGui.End();
return; return;
} }

View File

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<Version>1.0.4</Version> <Version>1.0.4</Version>
<TargetFramework>net6-windows</TargetFramework> <TargetFramework>net7-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -48,7 +48,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.8"/> <PackageReference Include="DalamudPackager" Version="2.1.11"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,8 +1,8 @@
name: The Heart of the Party name: The Heart of the Party
author: ascclemens author: Anna
punchline: Set your character's title - now with Searchalin! punchline: Set your character's title - now with Searchalin!
description: |- description: |-
The Heart of the Party is a remake of the in-game title picker, but it 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 supports searching. Note that it doesn't add a command to set your title; use
the built-in /title command instead. the built-in /title command instead.
repo_url: https://git.annaclemens.io/ascclemens/TheHeartOfTheParty repo_url: https://git.anna.lgbt/anna/TheHeartOfTheParty

View File

@ -1,12 +1,12 @@
{ {
"version": 1, "version": 1,
"dependencies": { "dependencies": {
"net6.0-windows7.0": { "net7.0-windows7.0": {
"DalamudPackager": { "DalamudPackager": {
"type": "Direct", "type": "Direct",
"requested": "[2.1.8, )", "requested": "[2.1.11, )",
"resolved": "2.1.8", "resolved": "2.1.11",
"contentHash": "YqagNXs9InxmqkXzq7kLveImxnodkBEicAhydMXVp7dFjC7xb76U6zGgAax4/BWIWfZeWzr5DJyQSev31kj81A==" "contentHash": "9qlAWoRRTiL/geAvuwR/g6Bcbrd/bJJgVnB/RurBiyKs6srsP0bvpoo8IK+Eg8EA6jWeM6/YJWs66w4FIAzqPw=="
} }
} }
} }