summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-12-12 00:09:28 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-12-12 00:09:28 -0500
commit7d644aeabee63c0d51d4e89360d2fdab0e51b8be (patch)
tree7fdce283e744c149f8dd90d05e907ea8247cdc94 /src/SMAPI/Framework/ModLoading
parent2c909f26fcf48fc1de7f3b23f5f83d28d4a5e253 (diff)
downloadSMAPI-7d644aeabee63c0d51d4e89360d2fdab0e51b8be.tar.gz
SMAPI-7d644aeabee63c0d51d4e89360d2fdab0e51b8be.tar.bz2
SMAPI-7d644aeabee63c0d51d4e89360d2fdab0e51b8be.zip
switch to simpler approach for mod-provided APIs (#409)
Diffstat (limited to 'src/SMAPI/Framework/ModLoading')
-rw-r--r--src/SMAPI/Framework/ModLoading/ModMetadata.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
index 2e5c27be..30fe211b 100644
--- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs
+++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs
@@ -30,7 +30,7 @@ namespace StardewModdingAPI.Framework.ModLoading
public IMod Mod { get; private set; }
/// <summary>The mod-provided API (if any).</summary>
- public IModProvidedApi Api { get; private set; }
+ public object Api { get; private set; }
/*********
@@ -62,10 +62,16 @@ namespace StardewModdingAPI.Framework.ModLoading
/// <summary>Set the mod instance.</summary>
/// <param name="mod">The mod instance to set.</param>
- /// <param name="api">The mod-provided API (if any).</param>
- public IModMetadata SetMod(IMod mod, IModProvidedApi api)
+ public IModMetadata SetMod(IMod mod)
{
this.Mod = mod;
+ return this;
+ }
+
+ /// <summary>Set the mod-provided API instance.</summary>
+ /// <param name="api">The mod-provided API.</param>
+ public IModMetadata SetApi(object api)
+ {
this.Api = api;
return this;
}