summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/ModHelpers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-08-01 00:51:27 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-08-01 00:51:27 -0400
commit3599daee459ee27bfe9374c675eb71d086fcfd81 (patch)
tree051773fc8cc5cfeceee0c7711da7cc4ae4c19301 /src/StardewModdingAPI/Framework/ModHelpers
parent9b22f3e004b35f66d9be6af211f20fe126fae209 (diff)
downloadSMAPI-3599daee459ee27bfe9374c675eb71d086fcfd81.tar.gz
SMAPI-3599daee459ee27bfe9374c675eb71d086fcfd81.tar.bz2
SMAPI-3599daee459ee27bfe9374c675eb71d086fcfd81.zip
remove support for invalidating mod assets per discussion (#335)
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModHelpers')
-rw-r--r--src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs
index c052759f..0456ce14 100644
--- a/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs
+++ b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs
@@ -182,14 +182,13 @@ namespace StardewModdingAPI.Framework.ModHelpers
}
/// <summary>Remove an asset from the content cache so it's reloaded on the next request. This will reload core game assets if needed, but references to the former asset will still show the previous content.</summary>
- /// <param name="key">The asset key to fetch (if the <paramref name="source"/> is <see cref="ContentSource.GameContent"/>), or the local path to a content file relative to the mod folder.</param>
- /// <param name="source">Where to search for a matching content asset.</param>
+ /// <param name="key">The asset key to invalidate in the content folder.</param>
/// <exception cref="ArgumentException">The <paramref name="key"/> is empty or contains invalid characters.</exception>
/// <returns>Returns whether the given asset key was cached.</returns>
- public bool InvalidateCache(string key, ContentSource source = ContentSource.ModFolder)
+ public bool InvalidateCache(string key)
{
- this.Monitor.Log($"Requested cache invalidation for '{key}' in {source}.", LogLevel.Trace);
- string actualKey = this.GetActualAssetKey(key, source);
+ this.Monitor.Log($"Requested cache invalidation for '{key}'.", LogLevel.Trace);
+ string actualKey = this.GetActualAssetKey(key, ContentSource.GameContent);
return this.ContentManager.InvalidateCache((otherKey, type) => otherKey.Equals(actualKey, StringComparison.InvariantCultureIgnoreCase));
}