Skip to content

Commit

Permalink
Localize location name on travel map
Browse files Browse the repository at this point in the history
If present Localized name will take priority over WorldDataReplacement, which takes priority over MAPS.BSA cached canonical name.
  • Loading branch information
Interkarma committed Nov 27, 2022
1 parent 13e174d commit 70aadac
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -1590,6 +1590,11 @@ protected virtual string GetLocationNameInCurrentRegion(int locationIndex, bool
if (cacheName && lastQueryLocationIndex == locationIndex)
return lastQueryLocationName;

// Localized name has first priority if one exists
string localizedName = TextManager.Instance.GetLocalizedLocationName(locationSummary.MapID, string.Empty);
if (!string.IsNullOrEmpty(localizedName))
return localizedName;

// Get location name from world data replacement if available or fall back to MAPS.BSA cached names
DFLocation location;
if (WorldDataReplacement.GetDFLocationReplacementData(currentDFRegionIndex, locationIndex, out location))
Expand Down

0 comments on commit 70aadac

Please sign in to comment.