Skip to content

Commit

Permalink
When opening wiki, use original name of the item, not localised name
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSav committed Dec 15, 2024
1 parent 77d0f2f commit 6a975d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog


## v0.0.31 (16 Dec 2024)
- When opening wiki, use original name of the item, not localised name

## v0.0.30 (4 Dec 2024)
- Fix a spelling mistake in items notes

Expand Down
12 changes: 10 additions & 2 deletions Remnant2SaveAnalyzer/Views/Pages/WorldAnalyzerPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,15 @@ private void SearchItem_Click(object sender, RoutedEventArgs e)
}
private static void SearchItem(LootItem item)
{
string name = item.Name;
if (item is LocalisedLootItem lootItem)
{
name = lootItem.OriginalName;
}

string wikiQuery = Properties.Settings.Default.Wiki == "remwiki" ?
$"https://remnant.wiki/{item.Name}" :
$"https://remnant2.wiki.fextralife.com/{item.Name}";
$"https://remnant.wiki/{name}" :
$"https://remnant2.wiki.fextralife.com/{name}";
Process.Start("explorer.exe", wikiQuery);
}
private void ExpandAllItem_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -827,6 +833,8 @@ public LocalisedLootItem(LootItem item, WorldAnalyzerPage parent)

public override string Name => Id == Loc.GameT(Id) ? base.Name : Loc.GameT(Id);

public string OriginalName => base.Name;

// ReSharper disable UnusedMember.Global
public Brush? PossibleItemTextColor =>
Remnant2SaveAnalyzer.Properties.Settings.Default.UnobtainableItemColor == "Dim" && IsLooted || Remnant2SaveAnalyzer.Properties.Settings.Default.NoPrerequisiteItemStyle == "Italic" && IsPrerequisiteMissing
Expand Down

0 comments on commit 6a975d1

Please sign in to comment.