From 3599daee459ee27bfe9374c675eb71d086fcfd81 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 1 Aug 2017 00:51:27 -0400 Subject: remove support for invalidating mod assets per discussion (#335) --- src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/StardewModdingAPI/Framework/ModHelpers') 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 } /// 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. - /// The asset key to fetch (if the is ), or the local path to a content file relative to the mod folder. - /// Where to search for a matching content asset. + /// The asset key to invalidate in the content folder. /// The is empty or contains invalid characters. /// Returns whether the given asset key was cached. - 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)); } -- cgit