diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-07 13:40:44 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-07 13:40:44 -0500 |
commit | a78b1935928919694dfe8de823a1accd6d222732 (patch) | |
tree | 3f17b6087cf2749e52c1e237de17e2e9addb6c06 /src/SMAPI/IModHelper.cs | |
parent | 4cd9eda1591c3908bf80b60c2902491a7595ee27 (diff) | |
parent | 8901218418693d610a17b22fe789ba6279f63446 (diff) | |
download | SMAPI-a78b1935928919694dfe8de823a1accd6d222732.tar.gz SMAPI-a78b1935928919694dfe8de823a1accd6d222732.tar.bz2 SMAPI-a78b1935928919694dfe8de823a1accd6d222732.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/IModHelper.cs')
-rw-r--r-- | src/SMAPI/IModHelper.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/SMAPI/IModHelper.cs b/src/SMAPI/IModHelper.cs index e4b5d390..fbe3d51f 100644 --- a/src/SMAPI/IModHelper.cs +++ b/src/SMAPI/IModHelper.cs @@ -14,7 +14,6 @@ namespace StardewModdingAPI string DirectoryPath { get; } /// <summary>Manages access to events raised by SMAPI, which let your mod react when something happens in the game.</summary> - [Obsolete("This is an experimental interface which may change at any time. Don't depend on this for released mods.")] IModEvents Events { get; } /// <summary>An API for managing console commands.</summary> @@ -57,6 +56,7 @@ namespace StardewModdingAPI /// <param name="config">The config settings to save.</param> void WriteConfig<TConfig>(TConfig config) where TConfig : class, new(); +#if !SMAPI_3_0_STRICT /**** ** Generic JSON files ****/ @@ -73,10 +73,21 @@ namespace StardewModdingAPI /// <param name="model">The model to save.</param> [Obsolete("Use " + nameof(IModHelper.Data) + "." + nameof(IDataHelper.WriteJsonFile) + " instead")] void WriteJsonFile<TModel>(string path, TModel model) where TModel : class; +#endif /**** ** Content packs ****/ + /// <summary>Create a temporary content pack to read files from a directory. Temporary content packs will not appear in the SMAPI log and update checks will not be performed.</summary> + /// <param name="directoryPath">The absolute directory path containing the content pack files.</param> + /// <param name="id">The content pack's unique ID.</param> + /// <param name="name">The content pack name.</param> + /// <param name="description">The content pack description.</param> + /// <param name="author">The content pack author's name.</param> + /// <param name="version">The content pack version.</param> + IContentPack CreateTemporaryContentPack(string directoryPath, string id, string name, string description, string author, ISemanticVersion version); + +#if !SMAPI_3_0_STRICT /// <summary>Manually create a transitional content pack to support pre-SMAPI content packs. This provides a way to access legacy content packs using the SMAPI content pack APIs, but the content pack will not be visible in the log or validated by SMAPI.</summary> /// <param name="directoryPath">The absolute directory path containing the content pack files.</param> /// <param name="id">The content pack's unique ID.</param> @@ -84,8 +95,9 @@ namespace StardewModdingAPI /// <param name="description">The content pack description.</param> /// <param name="author">The content pack author's name.</param> /// <param name="version">The content pack version.</param> - [Obsolete("This method supports mods which previously had their own content packs, and shouldn't be used by new mods. It will be removed in SMAPI 3.0.")] + [Obsolete("Use " + nameof(IModHelper) + "." + nameof(IModHelper.CreateTemporaryContentPack) + " instead")] IContentPack CreateTransitionalContentPack(string directoryPath, string id, string name, string description, string author, ISemanticVersion version); +#endif /// <summary>Get all content packs loaded for this mod.</summary> IEnumerable<IContentPack> GetContentPacks(); |