diff options
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers/BaseHelper.cs')
-rw-r--r-- | src/SMAPI/Framework/ModHelpers/BaseHelper.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/BaseHelper.cs b/src/SMAPI/Framework/ModHelpers/BaseHelper.cs index 1cd1a6b3..12390976 100644 --- a/src/SMAPI/Framework/ModHelpers/BaseHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/BaseHelper.cs @@ -1,25 +1,30 @@ -#nullable disable - namespace StardewModdingAPI.Framework.ModHelpers { /// <summary>The common base class for mod helpers.</summary> 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; } } } |