refactor: update for api7 and net6
This commit is contained in:
parent
8278a8db0d
commit
0456d77d7d
|
@ -1,13 +1,13 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5</TargetFramework>
|
<TargetFramework>net6</TargetFramework>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.ML" Version="1.6.0"/>
|
<PackageReference Include="Microsoft.ML" Version="1.7.1"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5</TargetFramework>
|
<TargetFramework>net6</TargetFramework>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ConsoleTables" Version="2.4.2"/>
|
<PackageReference Include="ConsoleTables" Version="2.4.2"/>
|
||||||
<PackageReference Include="CsvHelper" Version="27.1.1"/>
|
<PackageReference Include="CsvHelper" Version="28.0.1"/>
|
||||||
<PackageReference Include="Microsoft.ML" Version="1.6.0"/>
|
<PackageReference Include="Microsoft.ML" Version="1.7.1"/>
|
||||||
<PackageReference Include="MimeKitLite" Version="2.15.1"/>
|
<PackageReference Include="MimeKitLite" Version="3.4.0"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Dalamud.ContextMenu;
|
||||||
using NoSoliciting.Resources;
|
using NoSoliciting.Resources;
|
||||||
using XivCommon.Functions.ContextMenu;
|
|
||||||
|
|
||||||
namespace NoSoliciting {
|
namespace NoSoliciting {
|
||||||
public class ContextMenu : IDisposable {
|
public class ContextMenu : IDisposable {
|
||||||
|
@ -10,14 +10,14 @@ namespace NoSoliciting {
|
||||||
internal ContextMenu(Plugin plugin) {
|
internal ContextMenu(Plugin plugin) {
|
||||||
this.Plugin = plugin;
|
this.Plugin = plugin;
|
||||||
|
|
||||||
this.Plugin.Common.Functions.ContextMenu.OpenContextMenu += this.OnOpenContextMenu;
|
this.Plugin.DalamudContextMenu.OnOpenGameObjectContextMenu += this.OnOpenContextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose() {
|
public void Dispose() {
|
||||||
this.Plugin.Common.Functions.ContextMenu.OpenContextMenu -= this.OnOpenContextMenu;
|
this.Plugin.DalamudContextMenu.OnOpenGameObjectContextMenu -= this.OnOpenContextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnOpenContextMenu(ContextMenuOpenArgs args) {
|
private void OnOpenContextMenu(GameObjectContextMenuOpenArgs args) {
|
||||||
if (args.ParentAddonName != "LookingForGroup") {
|
if (args.ParentAddonName != "LookingForGroup") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@ namespace NoSoliciting {
|
||||||
}
|
}
|
||||||
|
|
||||||
var label = Language.ReportToNoSoliciting;
|
var label = Language.ReportToNoSoliciting;
|
||||||
args.Items.Add(new NormalContextMenuItem(label, this.Report));
|
args.AddCustomItem(new GameObjectContextMenuItem(label, this.Report));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Report(ContextMenuItemSelectedArgs args) {
|
private void Report(GameObjectContextMenuItemSelectedArgs args) {
|
||||||
if (args.ContentIdLower == 0) {
|
if (args.ContentIdLower == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,51 +4,56 @@
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>3.0.1</Version>
|
<Version>3.0.1</Version>
|
||||||
<TargetFramework>net5-windows</TargetFramework>
|
<TargetFramework>net6-windows</TargetFramework>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Dalamud>$(AppData)\XIVLauncher\addon\Hooks\dev</Dalamud>
|
<DalamudLibPath>$(AppData)\XIVLauncher\addon\Hooks\dev</DalamudLibPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'">
|
||||||
|
<DalamudLibPath>$(DALAMUD_HOME)</DalamudLibPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(IsCI)' == 'true'">
|
<PropertyGroup Condition="'$(IsCI)' == 'true'">
|
||||||
<Dalamud>$(HOME)/dalamud</Dalamud>
|
<DalamudLibPath>$(HOME)/dalamud</DalamudLibPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Dalamud">
|
<Reference Include="Dalamud">
|
||||||
<HintPath>$(Dalamud)\Dalamud.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\Dalamud.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ImGui.NET">
|
<Reference Include="ImGui.NET">
|
||||||
<HintPath>$(Dalamud)\ImGui.NET.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\ImGui.NET.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Lumina">
|
<Reference Include="Lumina">
|
||||||
<HintPath>$(Dalamud)\Lumina.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\Lumina.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Lumina.Excel">
|
<Reference Include="Lumina.Excel">
|
||||||
<HintPath>$(Dalamud)\Lumina.Excel.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\Lumina.Excel.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath>$(Dalamud)\Newtonsoft.Json.dll</HintPath>
|
<HintPath>$(DalamudLibPath)\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DalamudLinter" Version="1.0.3"/>
|
<PackageReference Include="Dalamud.ContextMenu" Version="1.2.0"/>
|
||||||
<PackageReference Include="DalamudPackager" Version="2.1.4"/>
|
<PackageReference Include="DalamudPackager" Version="2.1.7"/>
|
||||||
<PackageReference Include="Fody" Version="6.5.3" PrivateAssets="all"/>
|
<PackageReference Include="Fody" Version="6.6.3" PrivateAssets="all"/>
|
||||||
<PackageReference Include="Microsoft.ML" Version="1.6.0"/>
|
<PackageReference Include="Microsoft.ML" Version="1.7.1"/>
|
||||||
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all"/>
|
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all"/>
|
||||||
<PackageReference Include="XivCommon" Version="3.0.2"/>
|
<PackageReference Include="XivCommon" Version="6.0.0"/>
|
||||||
<PackageReference Include="YamlDotNet" Version="11.2.1"/>
|
<PackageReference Include="YamlDotNet" Version="12.0.0"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Update="Resources\Language.resx">
|
<EmbeddedResource Update="Resources\Language.resx">
|
||||||
|
@ -66,7 +71,4 @@
|
||||||
<DependentUpon>NoSoliciting.resx</DependentUpon>
|
<DependentUpon>NoSoliciting.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="..\icon.png" Link="images/icon.png" CopyToOutputDirectory="PreserveNewest" Visible="false"/>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -17,3 +17,4 @@ description: |-
|
||||||
repo_url: https://git.sr.ht/~jkcclemens/NoSoliciting
|
repo_url: https://git.sr.ht/~jkcclemens/NoSoliciting
|
||||||
# Use higher priority to filter messages before other plugins get them.
|
# Use higher priority to filter messages before other plugins get them.
|
||||||
load_priority: 100
|
load_priority: 100
|
||||||
|
dalamud_api_level: 7
|
||||||
|
|
|
@ -6,6 +6,7 @@ using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Dalamud;
|
using Dalamud;
|
||||||
|
using Dalamud.ContextMenu;
|
||||||
using Dalamud.Data;
|
using Dalamud.Data;
|
||||||
using Dalamud.Game.ClientState;
|
using Dalamud.Game.ClientState;
|
||||||
using Dalamud.Game.Command;
|
using Dalamud.Game.Command;
|
||||||
|
@ -51,6 +52,7 @@ namespace NoSoliciting {
|
||||||
|
|
||||||
internal PluginConfiguration Config { get; }
|
internal PluginConfiguration Config { get; }
|
||||||
internal XivCommonBase Common { get; }
|
internal XivCommonBase Common { get; }
|
||||||
|
internal DalamudContextMenu DalamudContextMenu { get; }
|
||||||
internal PluginUi Ui { get; }
|
internal PluginUi Ui { get; }
|
||||||
private Commands Commands { get; }
|
private Commands Commands { get; }
|
||||||
private ContextMenu ContextMenu { get; }
|
private ContextMenu ContextMenu { get; }
|
||||||
|
@ -78,7 +80,8 @@ namespace NoSoliciting {
|
||||||
this.ConfigureLanguage();
|
this.ConfigureLanguage();
|
||||||
this.Interface.LanguageChanged += this.OnLanguageUpdate;
|
this.Interface.LanguageChanged += this.OnLanguageUpdate;
|
||||||
|
|
||||||
this.Common = new XivCommonBase(Hooks.PartyFinder | Hooks.ContextMenu);
|
this.Common = new XivCommonBase(Hooks.PartyFinderListings);
|
||||||
|
this.DalamudContextMenu = new DalamudContextMenu();
|
||||||
|
|
||||||
this.Ui = new PluginUi(this);
|
this.Ui = new PluginUi(this);
|
||||||
this.Commands = new Commands(this);
|
this.Commands = new Commands(this);
|
||||||
|
@ -107,6 +110,7 @@ namespace NoSoliciting {
|
||||||
this.ContextMenu.Dispose();
|
this.ContextMenu.Dispose();
|
||||||
this.Commands.Dispose();
|
this.Commands.Dispose();
|
||||||
this.Ui.Dispose();
|
this.Ui.Dispose();
|
||||||
|
this.DalamudContextMenu.Dispose();
|
||||||
this.Common.Dispose();
|
this.Common.Dispose();
|
||||||
this.Interface.LanguageChanged -= this.OnLanguageUpdate;
|
this.Interface.LanguageChanged -= this.OnLanguageUpdate;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue