summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-05-11 00:16:10 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-05-11 00:16:10 -0400
commit86a477d310c63edf7e9cc0547ef26e544ade1817 (patch)
treea19c745f331477bebd5b4ee530d01aca34c82697 /src
parenteda6ddbdc6c597916ba533c98ad51a97b42c0d1f (diff)
downloadSMAPI-86a477d310c63edf7e9cc0547ef26e544ade1817.tar.gz
SMAPI-86a477d310c63edf7e9cc0547ef26e544ade1817.tar.bz2
SMAPI-86a477d310c63edf7e9cc0547ef26e544ade1817.zip
fix content cache always missed when not playing in English
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/SContentManager.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/SContentManager.cs b/src/SMAPI/Framework/SContentManager.cs
index e9f46acb..9353ee29 100644
--- a/src/SMAPI/Framework/SContentManager.cs
+++ b/src/SMAPI/Framework/SContentManager.cs
@@ -393,11 +393,16 @@ namespace StardewModdingAPI.Framework
return this.Cache.ContainsKey(normalisedAssetName);
// translated
- if (!this.IsLocalisableLookup.TryGetValue(normalisedAssetName, out bool localisable))
- return false;
- return localisable
- ? this.Cache.ContainsKey($"{normalisedAssetName}.{this.GetLocale(this.GetCurrentLanguage())}")
- : this.Cache.ContainsKey(normalisedAssetName);
+ string localeKey = $"{normalisedAssetName}.{this.GetLocale(this.GetCurrentLanguage())}";
+ if (this.IsLocalisableLookup.TryGetValue(localeKey, out bool localisable))
+ {
+ return localisable
+ ? this.Cache.ContainsKey(localeKey)
+ : this.Cache.ContainsKey(normalisedAssetName);
+ }
+
+ // not loaded yet
+ return false;
}
/****