summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-10 20:49:04 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-10 20:49:04 -0500
commitd881f568565f8a12025e013cf92eaa025aac8c7c (patch)
treef88de97339c4657a97bd3d232014533057a91c83 /src/StardewModdingAPI/Framework
parent363f5aeef2dac07299d8d37229fd205a8dff7a61 (diff)
downloadSMAPI-d881f568565f8a12025e013cf92eaa025aac8c7c.tar.gz
SMAPI-d881f568565f8a12025e013cf92eaa025aac8c7c.tar.bz2
SMAPI-d881f568565f8a12025e013cf92eaa025aac8c7c.zip
fix SMAPI not correctly detecting cached assets if they were translated (#173)
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r--src/StardewModdingAPI/Framework/SContentManager.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/Framework/SContentManager.cs b/src/StardewModdingAPI/Framework/SContentManager.cs
index e4b9d74e..ef5855b2 100644
--- a/src/StardewModdingAPI/Framework/SContentManager.cs
+++ b/src/StardewModdingAPI/Framework/SContentManager.cs
@@ -118,7 +118,8 @@ namespace StardewModdingAPI.Framework
/// <param name="normalisedAssetName">The normalised asset name.</param>
private bool IsLoaded(string normalisedAssetName)
{
- return this.Cache.ContainsKey(normalisedAssetName);
+ return this.Cache.ContainsKey(normalisedAssetName)
+ || this.Cache.ContainsKey($"{normalisedAssetName}.{this.GetKeyLocale.Invoke<string>()}"); // translated asset
}
/// <summary>Get the locale for which the asset name was saved, if any.</summary>