diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-11 22:25:45 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-11 22:25:45 -0400 |
commit | 03876153f4fbb13b8a260c529513a306319f9e05 (patch) | |
tree | 6913e9c42e792b2a36c9d3dd23249932d10c8a35 /src/StardewModdingAPI/Framework/ModMetadata.cs | |
parent | 48c5c9e36794ed3dae0cf6114194b0dc80dd4725 (diff) | |
download | SMAPI-03876153f4fbb13b8a260c529513a306319f9e05.tar.gz SMAPI-03876153f4fbb13b8a260c529513a306319f9e05.tar.bz2 SMAPI-03876153f4fbb13b8a260c529513a306319f9e05.zip |
decouple mod metadata vs assembly loading to enable upcoming mod dependencies (#285)
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModMetadata.cs')
-rw-r--r-- | src/StardewModdingAPI/Framework/ModMetadata.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Framework/ModMetadata.cs b/src/StardewModdingAPI/Framework/ModMetadata.cs new file mode 100644 index 00000000..aeb9261a --- /dev/null +++ b/src/StardewModdingAPI/Framework/ModMetadata.cs @@ -0,0 +1,40 @@ +using StardewModdingAPI.Framework.Models; + +namespace StardewModdingAPI.Framework +{ + /// <summary>Metadata for a mod.</summary> + internal class ModMetadata + { + /********* + ** Accessors + *********/ + /// <summary>The mod's display name.</summary> + public string DisplayName { get; } + + /// <summary>The mod's full directory path.</summary> + public string DirectoryPath { get; } + + /// <summary>The mod manifest.</summary> + public IManifest Manifest { get; } + + /// <summary>Optional metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.</summary> + public ModCompatibility Compatibility { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="displayName">The mod's display name.</param> + /// <param name="directoryPath">The mod's full directory path.</param> + /// <param name="manifest">The mod manifest.</param> + /// <param name="compatibility">Optional metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.</param> + public ModMetadata(string displayName, string directoryPath, IManifest manifest, ModCompatibility compatibility) + { + this.DisplayName = displayName; + this.DirectoryPath = directoryPath; + this.Manifest = manifest; + this.Compatibility = compatibility; + } + } +} |