Skip to content

Commit

Permalink
Fixed price overlay for furniture items.
Browse files Browse the repository at this point in the history
  • Loading branch information
josdemmers committed May 9, 2023
1 parent b5e1165 commit 5420108
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions NewWorldCompanion.Services/NewWorldDataStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -619,26 +619,26 @@ public bool IsNamedItem(string itemName)
{
return false;
}
else
else if(localisationIds.Count() > 1)
{
_logger.LogWarning($"Item: {itemName} is not unique. There are {localisationIds.Count()} entries found");
}

// Check all similar named items. If one of them is not "named" return false.
// Workaround need for weapon and resource that both share the name "Flint".
// Workaround needed for weapon and resource that both share the name "Flint".
bool uniqueNamedItem = true;
foreach (var localisationId in localisationIds)
{
var item = _masterItemDefinitionsJson.FirstOrDefault(i => i.Name.Equals($"@{localisationId.Key}", StringComparison.OrdinalIgnoreCase));
if (!item.ItemClass.Contains("Named"))
if (!item?.ItemClass.Contains("Named") ?? true)
{
uniqueNamedItem = false;
}
}
return uniqueNamedItem;
}

public string GetItemId(string itemName)//
public string GetItemId(string itemName)
{
var localisationId = _itemDefinitionsLocalisation.FirstOrDefault(x => x.Value.Replace("\\n", " ").Equals(itemName, StringComparison.OrdinalIgnoreCase)).Key;
MasterItemDefinitionsJson? item = _masterItemDefinitionsJson.FirstOrDefault(i => i.Name.Equals($"@{localisationId}", StringComparison.OrdinalIgnoreCase));
Expand Down
4 changes: 2 additions & 2 deletions NewWorldCompanion/common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<FileVersion>1.0.12.4</FileVersion>
<Version>1.0.12.4</Version>
<FileVersion>1.0.12.5</FileVersion>
<Version>1.0.12.5</Version>
<Copyright>Copyright © 2023</Copyright>
<TargetFramework>net6.0-windows</TargetFramework>
</PropertyGroup>
Expand Down
Binary file added readme/newworldcompanion.xcf
Binary file not shown.

0 comments on commit 5420108

Please sign in to comment.