Compare commits

..

No commits in common. "master" and "v6.0" have entirely different histories.
master ... v6.0

7 changed files with 16 additions and 29 deletions

View File

@ -1,6 +1,6 @@
<Project Sdk="Dalamud.NET.Sdk/11.0.0"> <Project Sdk="Dalamud.NET.Sdk/11.0.0">
<PropertyGroup> <PropertyGroup>
<Version>6.1</Version> <Version>6.0</Version>
<OutputPath>dist</OutputPath> <OutputPath>dist</OutputPath>
</PropertyGroup> </PropertyGroup>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project> <Project>
<Target Name="PackagePluginDebug" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'"> <Target Name="PackagePlugin" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
<DalamudPackager <DalamudPackager
ProjectDir="$(ProjectDir)" ProjectDir="$(ProjectDir)"
OutputPath="$(OutputPath)" OutputPath="$(OutputPath)"

View File

@ -1,10 +0,0 @@
namespace ARControl.GameData;
public enum EVentureCategoryType
{
None,
MIN,
BTN,
FSH,
DoWM,
}

View File

@ -63,16 +63,16 @@ internal sealed class Venture
public uint RowId { get; } public uint RowId { get; }
public ClassJobCategory Category { get; } public ClassJobCategory Category { get; }
public EVentureCategoryType CategoryType public string? CategoryName
{ {
get get
{ {
return Category.RowId switch return Category.RowId switch
{ {
17 => EVentureCategoryType.MIN, 17 => "MIN",
18 => EVentureCategoryType.BTN, 18 => "BTN",
19 => EVentureCategoryType.FSH, 19 => "FSH",
_ => EVentureCategoryType.DoWM, _ => "DoWM",
}; };
} }
} }

View File

@ -26,26 +26,23 @@ internal sealed class VentureResolver
return (null, null); return (null, null);
} }
if (venture.CategoryType != EVentureCategoryType.DoWM)
{
var itemToGather = _gameCache.ItemsToGather.FirstOrDefault(x => x.ItemId == itemId); var itemToGather = _gameCache.ItemsToGather.FirstOrDefault(x => x.ItemId == itemId);
if (itemToGather != null && !character.GatheredItems.Contains(itemToGather.GatheredItemId)) if (itemToGather != null && !character.GatheredItems.Contains(itemToGather.GatheredItemId))
{ {
_pluginLog.Information($"Character hasn't gathered {venture.Name} yet"); _pluginLog.Information($"Character hasn't gathered {venture.Name} yet");
return (null, null); return (null, null);
} }
}
_pluginLog.Debug( _pluginLog.Debug(
$"Found venture {venture.Name}, row = {venture.RowId}, checking if we have high enough stats"); $"Found venture {venture.Name}, row = {venture.RowId}, checking if we have high enough stats");
VentureReward? reward = null; VentureReward? reward = null;
if (venture.CategoryType is EVentureCategoryType.MIN or EVentureCategoryType.BTN) if (venture.CategoryName is "MIN" or "BTN")
{ {
if (retainer.Gathering >= venture.RequiredGathering) if (retainer.Gathering >= venture.RequiredGathering)
reward = venture.Rewards.Last( reward = venture.Rewards.Last(
x => retainer.Perception >= x.PerceptionMinerBotanist); x => retainer.Perception >= x.PerceptionMinerBotanist);
} }
else if (venture.CategoryType == EVentureCategoryType.FSH) else if (venture.CategoryName == "FSH")
{ {
if (retainer.Gathering >= venture.RequiredGathering) if (retainer.Gathering >= venture.RequiredGathering)
reward = venture.Rewards.Last( reward = venture.Rewards.Last(

View File

@ -241,7 +241,7 @@ internal sealed class LockedItemsTab : ITab
} }
// check if we are the correct job // check if we are the correct job
bool enabled = character.Retainers.Any(x => item.Ventures.Any(v => v.CategoryType != EVentureCategoryType.DoWM && v.MatchesJob(x.Job))); bool enabled = character.Retainers.Any(x => item.Ventures.Any(v => v.MatchesJob(x.Job)));
if (enabled) if (enabled)
{ {
// do we have it gathered on this char? // do we have it gathered on this char?

View File

@ -226,7 +226,7 @@ internal sealed class VentureListTab : ITab
ImGui.SetNextItemWidth(130 * ImGuiHelpers.GlobalScale); ImGui.SetNextItemWidth(130 * ImGuiHelpers.GlobalScale);
int quantity = item.RemainingQuantity; int quantity = item.RemainingQuantity;
if (ImGui.InputInt($"{venture.Name} ({string.Join(" ", ventures.Select(x => x.CategoryType.ToString()))})", if (ImGui.InputInt($"{venture.Name} ({string.Join(" ", ventures.Select(x => x.CategoryName))})",
ref quantity, 100)) ref quantity, 100))
{ {
item.RemainingQuantity = quantity; item.RemainingQuantity = quantity;
@ -452,7 +452,7 @@ internal sealed class VentureListTab : ITab
.Select(x => new .Select(x => new
{ {
Venture = x.First(), Venture = x.First(),
CategoryNames = x.Select(y => y.CategoryType.ToString()) CategoryNames = x.Select(y => y.CategoryName)
})) }))
{ {
IDalamudTextureWrap? icon = _iconCache.GetIcon(filtered.Venture.IconId); IDalamudTextureWrap? icon = _iconCache.GetIcon(filtered.Venture.IconId);