summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-04-21 21:00:43 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-04-21 21:00:43 -0400
commit6113482bef78381c1ca0f176b4f031b7e90d4db0 (patch)
treefac7976007144295c076ef9c29480dbcbffad018 /src
parent4fe7442905aec6efcae940fc22a6d66befb01f74 (diff)
downloadSMAPI-6113482bef78381c1ca0f176b4f031b7e90d4db0.tar.gz
SMAPI-6113482bef78381c1ca0f176b4f031b7e90d4db0.tar.bz2
SMAPI-6113482bef78381c1ca0f176b4f031b7e90d4db0.zip
fix is-asset-cached check not accounting for different behavior in English (#453)
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/ContentCore.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ContentCore.cs b/src/SMAPI/Framework/ContentCore.cs
index ef001f79..6e915f28 100644
--- a/src/SMAPI/Framework/ContentCore.cs
+++ b/src/SMAPI/Framework/ContentCore.cs
@@ -460,9 +460,13 @@ namespace StardewModdingAPI.Framework
/// <param name="normalisedAssetName">The normalised asset name.</param>
private bool IsNormalisedKeyLoaded(string normalisedAssetName)
{
+ // default English
+ if (this.Language == LocalizedContentManager.LanguageCode.en)
+ 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.Content.GetCurrentLanguage())}")
: this.Cache.ContainsKey(normalisedAssetName);