summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs')
-rw-r--r--src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs b/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs
index 7b25e090..ab590e10 100644
--- a/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs
+++ b/src/StardewModdingAPI/Framework/ModLoading/ModMetadata.cs
@@ -26,6 +26,9 @@ namespace StardewModdingAPI.Framework.ModLoading
/// <summary>The reason the metadata is invalid, if any.</summary>
public string Error { get; private set; }
+ /// <summary>The mod instance (if it was loaded).</summary>
+ public IMod Mod { get; private set; }
+
/*********
** Public methods
@@ -53,5 +56,13 @@ namespace StardewModdingAPI.Framework.ModLoading
this.Error = error;
return this;
}
+
+ /// <summary>Set the mod instance.</summary>
+ /// <param name="mod">The mod instance to set.</param>
+ public IModMetadata SetMod(IMod mod)
+ {
+ this.Mod = mod;
+ return this;
+ }
}
}