From 70aadac212d5677374bf0ed7f480636985be9382 Mon Sep 17 00:00:00 2001 From: Interkarma Date: Sun, 27 Nov 2022 11:58:50 +1000 Subject: [PATCH] Localize location name on travel map If present Localized name will take priority over WorldDataReplacement, which takes priority over MAPS.BSA cached canonical name. --- .../Game/UserInterfaceWindows/DaggerfallTravelMapWindow.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallTravelMapWindow.cs b/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallTravelMapWindow.cs index 9fe6e5c4e6..6522dc31f7 100644 --- a/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallTravelMapWindow.cs +++ b/Assets/Scripts/Game/UserInterfaceWindows/DaggerfallTravelMapWindow.cs @@ -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))