diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-14 23:00:30 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-14 23:00:30 -0400 |
commit | 1a3befa93e073b45e63781cc546cd7c52f316d7c (patch) | |
tree | 24c0e4f8d9459d75dbf097e19cfc9d7a0d21bc31 /src/SMAPI/Framework/ModHelpers/BaseHelper.cs | |
parent | 43c875c4c225ad248790c29f3abcb787cbbd2d7f (diff) | |
download | SMAPI-1a3befa93e073b45e63781cc546cd7c52f316d7c.tar.gz SMAPI-1a3befa93e073b45e63781cc546cd7c52f316d7c.tar.bz2 SMAPI-1a3befa93e073b45e63781cc546cd7c52f316d7c.zip |
track mod metadata reference in APIs for upcoming deprecation changes
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers/BaseHelper.cs')
-rw-r--r-- | src/SMAPI/Framework/ModHelpers/BaseHelper.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/BaseHelper.cs b/src/SMAPI/Framework/ModHelpers/BaseHelper.cs index 5a3d4bed..12390976 100644 --- a/src/SMAPI/Framework/ModHelpers/BaseHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/BaseHelper.cs @@ -4,20 +4,27 @@ namespace StardewModdingAPI.Framework.ModHelpers internal abstract class BaseHelper : IModLinked { /********* + ** Fields + *********/ + /// <summary>The mod using this instance.</summary> + protected readonly IModMetadata Mod; + + + /********* ** Accessors *********/ /// <inheritdoc /> - public string ModID { get; } + public string ModID => this.Mod.Manifest.UniqueID; /********* ** Protected methods *********/ /// <summary>Construct an instance.</summary> - /// <param name="modID">The unique ID of the relevant mod.</param> - protected BaseHelper(string modID) + /// <param name="mod">The mod using this instance.</param> + protected BaseHelper(IModMetadata mod) { - this.ModID = modID; + this.Mod = mod; } } } |