From 6113482bef78381c1ca0f176b4f031b7e90d4db0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 21 Apr 2018 21:00:43 -0400 Subject: fix is-asset-cached check not accounting for different behavior in English (#453) --- src/SMAPI/Framework/ContentCore.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 /// The normalised asset name. 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); -- cgit