diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-08 19:13:03 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-08 19:13:03 -0400 |
commit | ea3d3a6648f0a1c679a7593cfed0dacaed1ec045 (patch) | |
tree | 38e905efbea6b2c863e1327ea9e8156b325a2fd6 /src/SMAPI/Framework/ModLoading/ModMetadata.cs | |
parent | ec6025aad35addab8121a31d1c4abf667fd5210a (diff) | |
download | SMAPI-ea3d3a6648f0a1c679a7593cfed0dacaed1ec045.tar.gz SMAPI-ea3d3a6648f0a1c679a7593cfed0dacaed1ec045.tar.bz2 SMAPI-ea3d3a6648f0a1c679a7593cfed0dacaed1ec045.zip |
make duplicate-mod more intuitive
The error now shows the relative folder paths (instead of manifest IDs), and only one error will be logged instead of one per duplicate.
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/ModMetadata.cs')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModMetadata.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs index c02f0830..0a5f5d3f 100644 --- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs +++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs @@ -19,6 +19,9 @@ namespace StardewModdingAPI.Framework.ModLoading /// <summary>The mod's full directory path.</summary> public string DirectoryPath { get; } + /// <summary>The <see cref="IModMetadata.DirectoryPath"/> relative to the game's Mods folder.</summary> + public string RelativeDirectoryPath { get; } + /// <summary>The mod manifest.</summary> public IManifest Manifest { get; } @@ -59,12 +62,14 @@ namespace StardewModdingAPI.Framework.ModLoading /// <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="relativeDirectoryPath">The <paramref name="directoryPath"/> relative to the game's Mods folder.</param> /// <param name="manifest">The mod manifest.</param> /// <param name="dataRecord">Metadata about the mod from SMAPI's internal data (if any).</param> - public ModMetadata(string displayName, string directoryPath, IManifest manifest, ModDataRecordVersionedFields dataRecord) + public ModMetadata(string displayName, string directoryPath, string relativeDirectoryPath, IManifest manifest, ModDataRecordVersionedFields dataRecord) { this.DisplayName = displayName; this.DirectoryPath = directoryPath; + this.RelativeDirectoryPath = relativeDirectoryPath; this.Manifest = manifest; this.DataRecord = dataRecord; } |