summaryrefslogtreecommitdiff
path: root/src/SMAPI/IContentPack.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-06-20 18:01:48 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-06-20 18:01:48 -0400
commitdab1ef6acc243726247cee57877c3b3100106522 (patch)
tree627610696a998621327fb019586f956b9360bb95 /src/SMAPI/IContentPack.cs
parente0ef8a20a5e7ccf1de32ff1a06f1aa62e37eb1db (diff)
downloadSMAPI-dab1ef6acc243726247cee57877c3b3100106522.tar.gz
SMAPI-dab1ef6acc243726247cee57877c3b3100106522.tar.bz2
SMAPI-dab1ef6acc243726247cee57877c3b3100106522.zip
add flag to disable deprecated code
Diffstat (limited to 'src/SMAPI/IContentPack.cs')
-rw-r--r--src/SMAPI/IContentPack.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SMAPI/IContentPack.cs b/src/SMAPI/IContentPack.cs
index 73b1a860..5047b172 100644
--- a/src/SMAPI/IContentPack.cs
+++ b/src/SMAPI/IContentPack.cs
@@ -1,7 +1,9 @@
using System;
+#if SMAPI_DEPRECATED
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using xTile;
+#endif
namespace StardewModdingAPI
{
@@ -47,6 +49,7 @@ namespace StardewModdingAPI
void WriteJsonFile<TModel>(string path, TModel data)
where TModel : class;
+#if SMAPI_DEPRECATED
/// <summary>Load content from the content pack 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="Map"/>, <see cref="Texture2D"/>, <see cref="IRawTextureData"/>, and data structures; other types may be supported by the game's content pipeline.</typeparam>
/// <param name="key">The relative file path within the content pack (case-insensitive).</param>
@@ -61,5 +64,6 @@ namespace StardewModdingAPI
/// <exception cref="ArgumentException">The <paramref name="key"/> is empty or contains invalid characters.</exception>
[Obsolete($"Use {nameof(IContentPack.ModContent)}.{nameof(IModContentHelper.GetInternalAssetName)} instead. This method will be removed in SMAPI 4.0.0.")]
string GetActualAssetKey(string key);
+#endif
}
}