summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/IAssetLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/IAssetLoader.cs')
-rw-r--r--src/StardewModdingAPI/IAssetLoader.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/IAssetLoader.cs b/src/StardewModdingAPI/IAssetLoader.cs
new file mode 100644
index 00000000..ad97b941
--- /dev/null
+++ b/src/StardewModdingAPI/IAssetLoader.cs
@@ -0,0 +1,17 @@
+namespace StardewModdingAPI
+{
+ /// <summary>Provides the initial version for matching assets loaded by the game. SMAPI will raise an error if two mods try to load the same asset; in most cases you should use <see cref="IAssetEditor"/> instead.</summary>
+ public interface IAssetLoader
+ {
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Get whether this instance can load the initial version of the given asset.</summary>
+ /// <param name="asset">Basic metadata about the asset being loaded.</param>
+ bool CanLoad<T>(IAssetInfo asset);
+
+ /// <summary>Load a matched asset.</summary>
+ /// <param name="asset">Basic metadata about the asset being loaded.</param>
+ T Load<T>(IAssetInfo asset);
+ }
+}