Skip to content

Commit

Permalink
[STABLE] update for apiX
Browse files Browse the repository at this point in the history
  • Loading branch information
kalilistic committed Jul 2, 2024
1 parent 381892e commit 0293e42
Show file tree
Hide file tree
Showing 18 changed files with 208 additions and 313 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "DrunkenToad"]
path = DrunkenToad
url = https://github.com/kalilistic/dalamud.drunkentoad
1 change: 1 addition & 0 deletions DrunkenToad
Submodule DrunkenToad added at 929f05
6 changes: 6 additions & 0 deletions src/PriceCheck.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PriceCheck", "PriceCheck\PriceCheck.csproj", "{EBAF1BDC-2509-4504-8A4B-ED9C563FBEB6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrunkenToad", "..\DrunkenToad\DrunkenToad.csproj", "{DCA72F3A-A271-4C16-AC74-CE4BFCA1E13F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -12,5 +14,9 @@ Global
{EBAF1BDC-2509-4504-8A4B-ED9C563FBEB6}.Release|Any CPU.Build.0 = Release|x64
{EBAF1BDC-2509-4504-8A4B-ED9C563FBEB6}.Debug|Any CPU.ActiveCfg = Debug|x64
{EBAF1BDC-2509-4504-8A4B-ED9C563FBEB6}.Debug|Any CPU.Build.0 = Debug|x64
{DCA72F3A-A271-4C16-AC74-CE4BFCA1E13F}.Debug|Any CPU.ActiveCfg = Debug|x64
{DCA72F3A-A271-4C16-AC74-CE4BFCA1E13F}.Debug|Any CPU.Build.0 = Debug|x64
{DCA72F3A-A271-4C16-AC74-CE4BFCA1E13F}.Release|Any CPU.ActiveCfg = Release|x64
{DCA72F3A-A271-4C16-AC74-CE4BFCA1E13F}.Release|Any CPU.Build.0 = Release|x64
EndGlobalSection
EndGlobal
186 changes: 58 additions & 128 deletions src/PriceCheck/PriceCheck.csproj
Original file line number Diff line number Diff line change
@@ -1,128 +1,58 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>2.6.1.0</Version>
<Title>PriceCheck</Title>
<Authors>kalilistic</Authors>
<TargetFramework>net7.0-windows</TargetFramework>
<Platforms>x64</Platforms>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<Deterministic>true</Deterministic>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<NoWarn>SA1600,CS1591,CS0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<None Remove="stylecop.json" />
<AdditionalFiles Include="..\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
</ItemGroup>
<ItemGroup>
<None Remove="PriceCheck\Resource\loc\de.json" />
<None Remove="PriceCheck\Resource\loc\es.json" />
<None Remove="PriceCheck\Resource\loc\fr.json" />
<None Remove="PriceCheck\Resource\loc\it.json" />
<None Remove="PriceCheck\Resource\loc\ja.json" />
<None Remove="PriceCheck\Resource\loc\no.json" />
<None Remove="PriceCheck\Resource\loc\pt.json" />
<None Remove="PriceCheck\Resource\loc\ru.json" />
<None Remove="PriceCheck\Resource\loc\zh.json" />
</ItemGroup>
<ItemGroup>
<Reference Include="CheapLoc">
<HintPath>$(DalamudLibPath)CheapLoc.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Dalamud">
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="FFXIVClientStructs">
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ImGuiScene">
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lumina">
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lumina.Excel">
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ImGui.NET">
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.12" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="Dalamud.DrunkenToad" Version="1.7.2" />
<PackageReference Include="Dalamud.ContextMenu" Version="1.3.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="PriceCheck\Resource\translation" />
</ItemGroup>
<ItemGroup>
<None Remove="PriceCheck\Resource\translation\de.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\de.json" />
<None Remove="PriceCheck\Resource\translation\es.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\es.json" />
<None Remove="PriceCheck\Resource\translation\fr.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\fr.json" />
<None Remove="PriceCheck\Resource\translation\it.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\it.json" />
<None Remove="PriceCheck\Resource\translation\ja.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\ja.json" />
<None Remove="PriceCheck\Resource\translation\no.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\no.json" />
<None Remove="PriceCheck\Resource\translation\pt.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\pt.json" />
<None Remove="PriceCheck\Resource\translation\ru.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\ru.json" />
<None Remove="PriceCheck\Resource\translation\zh.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\zh.json" />
</ItemGroup>
</Project>
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
<PropertyGroup>
<Version>2.7.0.0</Version>
<Title>PriceCheck</Title>
<Authors>kalilistic</Authors>
</PropertyGroup>
<ItemGroup>
<None Remove="stylecop.json" />
<AdditionalFiles Include="..\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
</ItemGroup>
<ItemGroup>
<None Remove="PriceCheck\Resource\loc\de.json" />
<None Remove="PriceCheck\Resource\loc\es.json" />
<None Remove="PriceCheck\Resource\loc\fr.json" />
<None Remove="PriceCheck\Resource\loc\it.json" />
<None Remove="PriceCheck\Resource\loc\ja.json" />
<None Remove="PriceCheck\Resource\loc\no.json" />
<None Remove="PriceCheck\Resource\loc\pt.json" />
<None Remove="PriceCheck\Resource\loc\ru.json" />
<None Remove="PriceCheck\Resource\loc\zh.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="PriceCheck\Resource\translation" />
</ItemGroup>
<ItemGroup>
<None Remove="PriceCheck\Resource\translation\de.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\de.json" />
<None Remove="PriceCheck\Resource\translation\es.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\es.json" />
<None Remove="PriceCheck\Resource\translation\fr.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\fr.json" />
<None Remove="PriceCheck\Resource\translation\it.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\it.json" />
<None Remove="PriceCheck\Resource\translation\ja.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\ja.json" />
<None Remove="PriceCheck\Resource\translation\no.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\no.json" />
<None Remove="PriceCheck\Resource\translation\pt.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\pt.json" />
<None Remove="PriceCheck\Resource\translation\ru.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\ru.json" />
<None Remove="PriceCheck\Resource\translation\zh.json" />
<EmbeddedResource Include="PriceCheck\Resource\translation\zh.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DrunkenToad\DrunkenToad.csproj" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions src/PriceCheck/PriceCheck/Configuration/PriceCheckConfig.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Generic;

using Dalamud.DrunkenToad;
using Dalamud.Game.Text;

// ReSharper disable UseCollectionExpression
namespace PriceCheck
{
/// <summary>
Expand Down Expand Up @@ -118,7 +118,7 @@ public abstract class PriceCheckConfig
/// <summary>
/// Gets or sets the primary key for key bind.
/// </summary>
public PrimaryKey.Enum PrimaryKey { get; set; } = Dalamud.DrunkenToad.PrimaryKey.Enum.VkZ;
public PrimaryKey.Enum PrimaryKey { get; set; } = PriceCheck.PrimaryKey.Enum.VkZ;

/// <summary>
/// Gets or sets the minimum price to show.
Expand All @@ -143,12 +143,12 @@ public abstract class PriceCheckConfig
/// <summary>
/// Gets or sets list of items to show above.
/// </summary>
public List<byte> ShowContextAboveThis { get; set; } = new();
public List<byte> ShowContextAboveThis { get; set; } = new ();

/// <summary>
/// Gets or sets list of items to show below.
/// </summary>
public List<byte> ShowContextBelowThis { get; set; } = new();
public List<byte> ShowContextBelowThis { get; set; } = new ();

/// <summary>
/// Gets or sets chat channel to use for price check messages.
Expand Down
6 changes: 3 additions & 3 deletions src/PriceCheck/PriceCheck/Localization/LegacyLoc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
using Dalamud.Plugin;
using Dalamud.Plugin.Services;

namespace NeatNoter.Localization;
namespace PriceCheck.Localization;

public class LegacyLoc
{
private readonly DalamudPluginInterface pluginInterface;
private readonly IDalamudPluginInterface pluginInterface;
private readonly ICommandManager commandManager;
private readonly string pluginName;
private readonly Assembly assembly;

public LegacyLoc(DalamudPluginInterface pluginInterface, ICommandManager commandManager)
public LegacyLoc(IDalamudPluginInterface pluginInterface, ICommandManager commandManager)
{
this.pluginInterface = pluginInterface;
this.commandManager = commandManager;
Expand Down
15 changes: 8 additions & 7 deletions src/PriceCheck/PriceCheck/Model/PriceMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using CheapLoc;

// ReSharper disable UseCollectionExpression
namespace PriceCheck
{
/// <summary>
Expand All @@ -13,49 +14,49 @@ public class PriceMode
/// <summary>
/// List of price modes.
/// </summary>
public static readonly List<PriceMode> PriceModes = new();
public static readonly List<PriceMode> PriceModes = new ();

/// <summary>
/// List of price mode names.
/// </summary>
public static readonly List<string> PriceModeNames = new();
public static readonly List<string> PriceModeNames = new ();

/// <summary>
/// Price mode: historical average.
/// </summary>
public static readonly PriceMode AveragePrice = new(
public static readonly PriceMode AveragePrice = new (
0,
Loc.Localize("AveragePrice", "Average Price"),
Loc.Localize("AveragePriceDesc", "The average sale price in recent sale history with outliers removed beyond three standard deviations of the mean."));

/// <summary>
/// Price mode: current average.
/// </summary>
public static readonly PriceMode CurrentAveragePrice = new(
public static readonly PriceMode CurrentAveragePrice = new (
1,
Loc.Localize("CurrentAveragePrice", "Current Average Price"),
Loc.Localize("CurrentAveragePriceDesc", "The average sale price in current listings with outliers removed beyond three standard deviations of the mean."));

/// <summary>
/// Price mode: minimum price.
/// </summary>
public static readonly PriceMode MinimumPrice = new(
public static readonly PriceMode MinimumPrice = new (
2,
Loc.Localize("MinimumPrice", "Minimum Price"),
Loc.Localize("MinimumPriceDesc", "The minimum price in current listings."));

/// <summary>
/// Price mode: maximum price.
/// </summary>
public static readonly PriceMode MaximumPrice = new(
public static readonly PriceMode MaximumPrice = new (
3,
Loc.Localize("MaximumPrice", "Maximum Price"),
Loc.Localize("MaximumPriceDesc", "The maximum price in current listings."));

/// <summary>
/// Price mode: current minimum price.
/// </summary>
public static readonly PriceMode CurrentMinimumPrice = new(
public static readonly PriceMode CurrentMinimumPrice = new (
4,
Loc.Localize("CurrentMinimumPrice", "Current Minimum Price"),
Loc.Localize("CurrentMinimumPriceDesc", "The minimum price in current listings across both normal and high quality items."));
Expand Down
2 changes: 2 additions & 0 deletions src/PriceCheck/PriceCheck/Model/PricedItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

using Dalamud.Interface.Colors;

// ReSharper disable RedundantDefaultMemberInitializer
// ReSharper disable PropertyCanBeMadeInitOnly.Global
namespace PriceCheck
{
/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions src/PriceCheck/PriceCheck/Model/PrimaryKey.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Dalamud.DrunkenToad
namespace PriceCheck
{
/// <summary>
/// Gets primary key.
Expand All @@ -11,7 +11,7 @@ public static class PrimaryKey
/// Get primary key names.
/// </summary>
public static readonly string[] Names =
{
[
"None",
"0",
"1",
Expand Down Expand Up @@ -48,8 +48,8 @@ public static class PrimaryKey
"W",
"X",
"Y",
"Z",
};
"Z"
];

/// <summary>
/// primary key enum.
Expand Down
Loading

0 comments on commit 0293e42

Please sign in to comment.