summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/IContentEventData.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-06-09 21:13:01 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-07-01 12:18:41 -0400
commit49c75de5fc139144b152207ba05f2936a2d25904 (patch)
tree537234c4f7c3d99323edbc77ae9f4619d4fcc568 /src/StardewModdingAPI/IContentEventData.cs
parent7b6b2742f65ac1d2590357babc517b6cd9b69d04 (diff)
downloadSMAPI-49c75de5fc139144b152207ba05f2936a2d25904.tar.gz
SMAPI-49c75de5fc139144b152207ba05f2936a2d25904.tar.bz2
SMAPI-49c75de5fc139144b152207ba05f2936a2d25904.zip
rewrite content interception using latest proposed API (#255)
Diffstat (limited to 'src/StardewModdingAPI/IContentEventData.cs')
-rw-r--r--src/StardewModdingAPI/IContentEventData.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/StardewModdingAPI/IContentEventData.cs b/src/StardewModdingAPI/IContentEventData.cs
deleted file mode 100644
index 7e2d4df1..00000000
--- a/src/StardewModdingAPI/IContentEventData.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-
-namespace StardewModdingAPI
-{
- /// <summary>Generic metadata and methods for a content asset being loaded.</summary>
- /// <typeparam name="TValue">The expected data type.</typeparam>
- public interface IContentEventData<TValue>
- {
- /*********
- ** Accessors
- *********/
- /// <summary>The content's locale code, if the content is localised.</summary>
- string Locale { get; }
-
- /// <summary>The normalised asset name being read. The format may change between platforms; see <see cref="IsAssetName"/> to compare with a known path.</summary>
- string AssetName { get; }
-
- /// <summary>The content data being read.</summary>
- TValue Data { get; }
-
- /// <summary>The content data type.</summary>
- Type DataType { get; }
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Get whether the asset name being loaded matches a given name after normalisation.</summary>
- /// <param name="path">The expected asset path, relative to the game's content folder and without the .xnb extension or locale suffix (like 'Data\ObjectInformation').</param>
- bool IsAssetName(string path);
-
- /// <summary>Replace the entire content value with the given value. This is generally not recommended, since it may break compatibility with other mods or different versions of the game.</summary>
- /// <param name="value">The new content value.</param>
- /// <exception cref="ArgumentNullException">The <paramref name="value"/> is null.</exception>
- /// <exception cref="InvalidCastException">The <paramref name="value"/>'s type is not compatible with the loaded asset's type.</exception>
- void ReplaceWith(TValue value);
- }
-}