summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs4
-rw-r--r--src/StardewModdingAPI/IContentHelper.cs16
2 files changed, 18 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs
index 0456ce14..1e987f00 100644
--- a/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs
+++ b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs
@@ -47,10 +47,10 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal ObservableCollection<IAssetLoader> ObservableAssetLoaders { get; } = new ObservableCollection<IAssetLoader>();
/// <summary>Interceptors which provide the initial versions of matching content assets.</summary>
- internal IList<IAssetLoader> AssetLoaders => this.ObservableAssetLoaders;
+ public IList<IAssetLoader> AssetLoaders => this.ObservableAssetLoaders;
/// <summary>Interceptors which edit matching content assets after they're loaded.</summary>
- internal IList<IAssetEditor> AssetEditors => this.ObservableAssetEditors;
+ public IList<IAssetEditor> AssetEditors => this.ObservableAssetEditors;
/*********
diff --git a/src/StardewModdingAPI/IContentHelper.cs b/src/StardewModdingAPI/IContentHelper.cs
index beaaf5d4..f32c1d18 100644
--- a/src/StardewModdingAPI/IContentHelper.cs
+++ b/src/StardewModdingAPI/IContentHelper.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
@@ -7,6 +8,21 @@ namespace StardewModdingAPI
/// <summary>Provides an API for loading content assets.</summary>
public interface IContentHelper : IModLinked
{
+ /*********
+ ** Accessors
+ *********/
+#if !SMAPI_1_x
+ /// <summary>Interceptors which provide the initial versions of matching content assets.</summary>
+ IList<IAssetLoader> AssetLoaders { get; }
+
+ /// <summary>Interceptors which edit matching content assets after they're loaded.</summary>
+ IList<IAssetEditor> AssetEditors { get; }
+#endif
+
+
+ /*********
+ ** Public methods
+ *********/
/// <summary>Load content from the game folder or mod folder (if not already cached), and return it. When loading a <c>.png</c> file, this must be called outside the game's draw loop.</summary>
/// <typeparam name="T">The expected data type. The main supported types are <see cref="Texture2D"/> and dictionaries; other types may be supported by the game's content pipeline.</typeparam>
/// <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>