Skip to content

Commit

Permalink
update analyser lib, refactored for the new LootItemExtended interface
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSav committed Jan 20, 2025
1 parent ae88958 commit caab0fc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## 0.0.36 (21 Jan 2025)
- Fixed a crahs

## 0.0.35 (13 Jan 2025)
- Update analyser library
Expand Down
1 change: 1 addition & 0 deletions Remnant2SaveAnalyzer-dev.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bloodmoon/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Brabus/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cabe/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Cervine/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Charnel/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=craftable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=dlcs/@EntryIndexedValue">True</s:Boolean>
Expand Down
2 changes: 1 addition & 1 deletion Remnant2SaveAnalyzer/Remnant2SaveAnalyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="lib.remnant2.analyzer" Version="0.0.37" />
<PackageReference Include="lib.remnant2.analyzer" Version="0.0.39" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
Expand Down
3 changes: 0 additions & 3 deletions Remnant2SaveAnalyzer/RemnantSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ private void ReportPlayerInfo()
logger.Information($"BEGIN Inventory, Character {index+1} (save_{character.Index})");


List<InventoryItem> debug = character.Profile.Inventory.Where(x => x.ProfileId == "/Game/Items/Common/Item_DragonHeartUpgrade.Item_DragonHeartUpgrade_C").ToList();


List<IGrouping<string, InventoryItem>> itemTypes = [.. character.Profile.Inventory
.GroupBy(x => x.LootItem?.Type)
.OrderBy(x=> x.Key)];
Expand Down
9 changes: 5 additions & 4 deletions Remnant2SaveAnalyzer/Views/Pages/WorldAnalyzerPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ private List<WorldAnalyzerGridData> FilterGridData(Profile profile, RolledWorld?
private List<WorldAnalyzerGridData> AddLootGroup(LootGroup lg, string locationName, List<string> missingIds)
{
List<WorldAnalyzerGridData> result = [];
List<LootItem> items = lg.Items;
List<LootItemExtended> items = lg.Items;
if (!Properties.Settings.Default.ShowCoopItems)
{
items = items.Where(x => !x.Properties.ContainsKey("Coop") || x.Properties["Coop"] != "True").ToList();
Expand Down Expand Up @@ -819,15 +819,16 @@ private List<WorldAnalyzerGridData> AddLootGroup(LootGroup lg, string locationNa
return result;
}

public class LocalisedLootItem : LootItem
public class LocalisedLootItem : LootItemExtended
{
private readonly WorldAnalyzerPage _parent;
[SetsRequiredMembers]
public LocalisedLootItem(LootItem item, WorldAnalyzerPage parent)
public LocalisedLootItem(LootItemExtended item, WorldAnalyzerPage parent) : base(item)
{
IsLooted = item.IsLooted;
IsPrerequisiteMissing = item.IsPrerequisiteMissing;
Properties = item.Properties;
IsVendoredAccountAward = item.IsVendoredAccountAward;
HasRequiredMaterial = item.HasRequiredMaterial;
_parent = parent;
}

Expand Down

0 comments on commit caab0fc

Please sign in to comment.