From e447ce225f46f60131519a1ff77dfddf520696bb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 13 Dec 2018 01:16:38 -0500 Subject: add content pack API --- src/SMAPI/IContentPackHelper.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/SMAPI/IContentPackHelper.cs (limited to 'src/SMAPI/IContentPackHelper.cs') diff --git a/src/SMAPI/IContentPackHelper.cs b/src/SMAPI/IContentPackHelper.cs new file mode 100644 index 00000000..0c734432 --- /dev/null +++ b/src/SMAPI/IContentPackHelper.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace StardewModdingAPI +{ + /// Provides an API for managing content packs. + public interface IContentPackHelper : IModLinked + { + /********* + ** Public methods + *********/ + /// Get all content packs loaded for this mod. + IEnumerable GetOwned(); + + /// 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. + /// The absolute directory path containing the content pack files. + IContentPack CreateFake(string directoryPath); + + /// 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. + /// The absolute directory path containing the content pack files. + /// The content pack's unique ID. + /// The content pack name. + /// The content pack description. + /// The content pack author's name. + /// The content pack version. + IContentPack CreateFake(string directoryPath, string id, string name, string description, string author, ISemanticVersion version); + } +} -- cgit From 11787f9fea35ee8597c8a4c028b9c3be42751463 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 13 Dec 2018 01:26:54 -0500 Subject: tweak new API method name --- src/SMAPI/IContentPackHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/IContentPackHelper.cs') diff --git a/src/SMAPI/IContentPackHelper.cs b/src/SMAPI/IContentPackHelper.cs index 0c734432..6cce964c 100644 --- a/src/SMAPI/IContentPackHelper.cs +++ b/src/SMAPI/IContentPackHelper.cs @@ -22,6 +22,6 @@ namespace StardewModdingAPI /// The content pack description. /// The content pack author's name. /// The content pack version. - IContentPack CreateFake(string directoryPath, string id, string name, string description, string author, ISemanticVersion version); + IContentPack CreateTemporary(string directoryPath, string id, string name, string description, string author, ISemanticVersion version); } } -- cgit From 95b1dedb667d1fe2fd9ee89ece342bacbdd3be48 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 13 Dec 2018 02:11:06 -0500 Subject: clarify docblock --- src/SMAPI/IContentPackHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/IContentPackHelper.cs') diff --git a/src/SMAPI/IContentPackHelper.cs b/src/SMAPI/IContentPackHelper.cs index 6cce964c..e4949f58 100644 --- a/src/SMAPI/IContentPackHelper.cs +++ b/src/SMAPI/IContentPackHelper.cs @@ -11,7 +11,7 @@ namespace StardewModdingAPI /// Get all content packs loaded for this mod. IEnumerable GetOwned(); - /// 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. + /// Create a temporary content pack to read files from a directory, using randomised manifest fields. Temporary content packs will not appear in the SMAPI log and update checks will not be performed. /// The absolute directory path containing the content pack files. IContentPack CreateFake(string directoryPath); -- cgit