-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fad7e60
commit f94935b
Showing
6 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
Submodule CriticalCommonLib
updated
7 files
+2 −2 | Crafting/CraftList.cs | |
+1 −1 | CriticalCommonLib.csproj | |
+2 −0 | Extensions/ExcelSheetExtensions.cs | |
+1 −0 | Models/Icons.cs | |
+1 −0 | Sheets/ENpc.cs | |
+41 −1 | Sheets/ItemEx.cs | |
+3 −3 | packages.lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
InventoryTools/Logic/Columns/FromCalamitySalvagerColumn.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
40
InventoryTools/Logic/Filters/FromCalamitySalvagerFilter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters