Skip to content

Commit

Permalink
assorted minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSav committed Oct 30, 2024
1 parent 834ab17 commit 06577bf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Analyzer.LootGroups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private static void FillLootGroups(RolledWorld world)
operation = performanceLogger.BeginOperation($"Character {characterIndex} (save_{characterSlot}), mode: {mode}, process additional looted markers");
// Since we process Looted Markers from the first zone for every location
// we do not want to display the missing loot marker message more than once per item. We will keep track of those here
HashSet<string> missingLootedMarkers = new();
HashSet<string> missingLootedMarkers = [];
foreach (Zone zone in world.AllZones)
{
// Story associated loot items are attached to the first zone location in the save,
Expand All @@ -194,6 +194,9 @@ private static void FillLootGroups(RolledWorld world)
{
foreach (LootedMarker marker in location.LootedMarkers.Union(firstL.LootedMarkers))
{
if (marker.ProfileId == "/Game/World_DLC3/Items/Weapons/RepairTool/Weapon_RepairTool.Weapon_RepairTool_C" && marker.SpawnPointTags[0] == "Reward_SingleCore")
continue;

LootItem? li = ItemDb.GetItemByProfileId(marker.ProfileId);
if (li == null)
{
Expand Down Expand Up @@ -429,13 +432,13 @@ bool Check(string cur)

string itemProfileId = currentItem.Properties["ProfileId"];

if (profile.Inventory.Select(y => y.ProfileId.ToLowerInvariant()).Contains(itemProfileId.ToLowerInvariant()) && checkHave)
if (profile.Inventory.Where(y => y.Quantity is null or > 0).Select(y => y.ProfileId.ToLowerInvariant()).Contains(itemProfileId.ToLowerInvariant()) && checkHave)
{
prerequisiteLogger.Information($" Have '{cur}'");
return true;
}

if (world.QuestInventory.Select(y => y.ProfileId.ToLowerInvariant()).Contains(itemProfileId.ToLowerInvariant()) && checkHave)
if (world.QuestInventory.Where(y => y.Quantity is null or > 0).Select(y => y.ProfileId.ToLowerInvariant()).Contains(itemProfileId.ToLowerInvariant()) && checkHave)
{
prerequisiteLogger.Information($" Have '{cur}'");
return true;
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.0.27 (30 Oct 2024)
- Improved looted detection for Repair tool
- Fixed Mortal Coil not detecting when Forbidden Grove is rolled
- Fixed prerequisite detectction counting zero quantity items as present

## v0.0.26 (28 Oct 2024)
- Add DLC3 items

Expand Down
1 change: 0 additions & 1 deletion Model/Location.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public List<string> Vendors
result.Add("Dwell");
result.Add("Brabus");
result.Add("Norah");
result.Add("Duane");
result.Add("Spark");
}

Expand Down
5 changes: 2 additions & 3 deletions db.json
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,7 @@
"ProfileId": "/Game/World_DLC3/Items/Trinkets/Amulets/ChefMedal/Amulet_ChefMedal.Amulet_ChefMedal_C",
"Type": "amulet",
"World": "World_DLC3",
"DropType": "Vendor",
"DropReference": "Duane",
"DropType": "Progression",
"Note": "Obtained from Duane in Ward 13 after acquiring the Meat Shake, Egg Drink, and Numbing Agent",
"Undetectable": true
},
Expand Down Expand Up @@ -7797,7 +7796,7 @@
"World": "World_Jungle",
"Name": "Fruit of Death",
"DropType": "Location",
"DropReference": "Forbidden Grove",
"DropReference": "The Forbidden Grove",
"Prerequisite": "Amulet_RavagersMark"
},
{
Expand Down

0 comments on commit 06577bf

Please sign in to comment.