From dab1ef6acc243726247cee57877c3b3100106522 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 20 Jun 2022 18:01:48 -0400 Subject: add flag to disable deprecated code --- src/SMAPI/IContentPack.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/SMAPI/IContentPack.cs') 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(string path, TModel data) where TModel : class; +#if SMAPI_DEPRECATED /// Load content from the content pack folder (if not already cached), and return it. When loading a .png file, this must be called outside the game's draw loop. /// The expected data type. The main supported types are , , , and data structures; other types may be supported by the game's content pipeline. /// The relative file path within the content pack (case-insensitive). @@ -61,5 +64,6 @@ namespace StardewModdingAPI /// The is empty or contains invalid characters. [Obsolete($"Use {nameof(IContentPack.ModContent)}.{nameof(IModContentHelper.GetInternalAssetName)} instead. This method will be removed in SMAPI 4.0.0.")] string GetActualAssetKey(string key); +#endif } } -- cgit