Skip to content

Commit

Permalink
1.7.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Critical-Impact committed Jul 19, 2024
1 parent fad7e60 commit f94935b
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 5 deletions.
11 changes: 11 additions & 0 deletions InventoryTools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

## [1.7.0.14] - 2024-07-19

### Added

- Added a calamity salvager filter and column, also items that can be purchased from a calamity salvager will be listed within the item window for applicable items

### Fixed

- Fixed a bug that would list missing ingredients for a craft even if they weren't missing
- Fixed duplicate patch data that was breaking the patch column

## [1.7.0.13] - 2024-07-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion InventoryTools/InventoryTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<LangVersion>12</LangVersion>
<Version>1.2.0.11</Version>
<Version>1.7.0.14</Version>
<AssemblyName>InventoryTools</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
Expand Down
36 changes: 36 additions & 0 deletions InventoryTools/Logic/Columns/FromCalamitySalvagerColumn.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using CriticalCommonLib.Models;
using CriticalCommonLib.Sheets;
using InventoryTools.Logic.Columns.Abstract;
using InventoryTools.Services;
using Microsoft.Extensions.Logging;

namespace InventoryTools.Logic.Columns;

public class FromCalamitySalvagerColumn : CheckboxColumn
{
public FromCalamitySalvagerColumn(ILogger<FromCalamitySalvagerColumn> logger, ImGuiService imGuiService) : base(logger, imGuiService)
{
}

public override string Name { get; set; } = "Is from Calamity Salvager?";
public override float Width { get; set; } = 100;
public override string HelpText { get; set; } = "Is this item available at a calmity salvager?";
public override ColumnCategory ColumnCategory { get; } = ColumnCategory.Basic;
public override bool HasFilter { get; set; } = true;
public override ColumnFilterType FilterType { get; set; } = ColumnFilterType.Boolean;

public override bool? CurrentValue(ColumnConfiguration columnConfiguration, InventoryItem item)
{
return CurrentValue(columnConfiguration, item.Item);
}

public override bool? CurrentValue(ColumnConfiguration columnConfiguration, ItemEx item)
{
return item.ObtainedCalamitySalvager;
}

public override bool? CurrentValue(ColumnConfiguration columnConfiguration, SortingResult item)
{
return CurrentValue(columnConfiguration, item.Item);
}
}
40 changes: 40 additions & 0 deletions InventoryTools/Logic/Filters/FromCalamitySalvagerFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using CriticalCommonLib.Models;
using CriticalCommonLib.Sheets;
using InventoryTools.Logic.Filters.Abstract;
using InventoryTools.Services;
using Microsoft.Extensions.Logging;

namespace InventoryTools.Logic.Filters;

public class FromCalamitySalvagerFilter : BooleanFilter
{
public FromCalamitySalvagerFilter(ILogger<FromCalamitySalvagerFilter> logger, ImGuiService imGuiService) : base(logger, imGuiService)
{
}

public override string Key { get; set; } = "FromCalamitySalvager";
public override string Name { get; set; } = "Is from Calamity Salvager?";
public override string HelpText { get; set; } = "Is this item available at a calmity salvager?";
public override FilterCategory FilterCategory { get; set; } = FilterCategory.Basic;

public override FilterType AvailableIn { get; set; } =
FilterType.SearchFilter | FilterType.SortingFilter | FilterType.GameItemFilter | FilterType.HistoryFilter |
FilterType.CraftFilter;
public override bool? FilterItem(FilterConfiguration configuration, InventoryItem item)
{
return FilterItem(configuration, item.Item);
}

public override bool? FilterItem(FilterConfiguration configuration, ItemEx item)
{
var currentValue = CurrentValue(configuration);
if (currentValue == null) return true;

if(currentValue.Value && item.ObtainedCalamitySalvager)
{
return true;
}

return !currentValue.Value && !item.ObtainedCalamitySalvager;
}
}
6 changes: 3 additions & 3 deletions InventoryTools/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@
},
"LuminaSupplemental.Excel": {
"type": "Transitive",
"resolved": "2.0.1",
"contentHash": "8e66vQqftCTkurXQOWKKYIecLYKhcKCHP8sth2IM6UhbfeviUhaZs4iOe4JqItn8z3TEoIEKupjJdg1mBuoOxQ==",
"resolved": "2.0.2",
"contentHash": "y5reV6M3MIrUkULs7C2ApGUGPyPNVIPSSvhckImGjhgopUkcs9qOalkVue3U1QLf1Zec4Lr9ibzWkdiiPnEYnQ==",
"dependencies": {
"CSVFile": "3.1.0",
"CsvHelper": "30.0.1"
Expand Down Expand Up @@ -592,7 +592,7 @@
"dependencies": {
"Dalamud.ContextMenu": "[1.3.1, )",
"Humanizer.Core": "[2.14.1, )",
"LuminaSupplemental.Excel": "[2.0.1, )",
"LuminaSupplemental.Excel": "[2.0.2, )",
"Microsoft.Extensions.Hosting": "[7.0.1, )",
"NaturalSort.Extension": "[3.2.0, )",
"SerialQueue": "[2.1.0, )",
Expand Down

0 comments on commit f94935b

Please sign in to comment.