diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-17 16:34:31 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-17 18:54:57 -0500 |
commit | 4444b590f016ebecfc113a0dd4584723b0250f41 (patch) | |
tree | dea12bd0ad7d6c0328ffefcd47dc1c5166b4b8db /src/SMAPI/Framework/Models | |
parent | 0c1bca3db044b6f228538f1738d52c31e4481e48 (diff) | |
download | SMAPI-4444b590f016ebecfc113a0dd4584723b0250f41.tar.gz SMAPI-4444b590f016ebecfc113a0dd4584723b0250f41.tar.bz2 SMAPI-4444b590f016ebecfc113a0dd4584723b0250f41.zip |
add content pack feature (#436)
Diffstat (limited to 'src/SMAPI/Framework/Models')
-rw-r--r-- | src/SMAPI/Framework/Models/Manifest.cs | 6 | ||||
-rw-r--r-- | src/SMAPI/Framework/Models/ManifestContentPackFor.cs | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Models/Manifest.cs b/src/SMAPI/Framework/Models/Manifest.cs index f9762406..74303cba 100644 --- a/src/SMAPI/Framework/Models/Manifest.cs +++ b/src/SMAPI/Framework/Models/Manifest.cs @@ -27,9 +27,13 @@ namespace StardewModdingAPI.Framework.Models [JsonConverter(typeof(SemanticVersionConverter))] public ISemanticVersion MinimumApiVersion { get; set; } - /// <summary>The name of the DLL in the directory that has the <see cref="IMod.Entry"/> method.</summary> + /// <summary>The name of the DLL in the directory that has the <see cref="IMod.Entry"/> method. Mutually exclusive with <see cref="ContentPackFor"/>.</summary> public string EntryDll { get; set; } + /// <summary>The mod which will read this as a content pack. Mutually exclusive with <see cref="IManifest.EntryDll"/>.</summary> + [JsonConverter(typeof(ManifestContentPackForConverter))] + public IManifestContentPackFor ContentPackFor { get; set; } + /// <summary>The other mods that must be loaded before this mod.</summary> [JsonConverter(typeof(ManifestDependencyArrayConverter))] public IManifestDependency[] Dependencies { get; set; } diff --git a/src/SMAPI/Framework/Models/ManifestContentPackFor.cs b/src/SMAPI/Framework/Models/ManifestContentPackFor.cs new file mode 100644 index 00000000..7836bbcc --- /dev/null +++ b/src/SMAPI/Framework/Models/ManifestContentPackFor.cs @@ -0,0 +1,15 @@ +namespace StardewModdingAPI.Framework.Models +{ + /// <summary>Indicates which mod can read the content pack represented by the containing manifest.</summary> + internal class ManifestContentPackFor : IManifestContentPackFor + { + /********* + ** Accessors + *********/ + /// <summary>The unique ID of the mod which can read this content pack.</summary> + public string UniqueID { get; set; } + + /// <summary>The minimum required version (if any).</summary> + public ISemanticVersion MinimumVersion { get; set; } + } +} |