summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/IModMetadata.cs9
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/ModMetadata.cs12
3 files changed, 16 insertions, 7 deletions
diff --git a/src/SMAPI/Framework/IModMetadata.cs b/src/SMAPI/Framework/IModMetadata.cs
index c4be7daf..a36994fd 100644
--- a/src/SMAPI/Framework/IModMetadata.cs
+++ b/src/SMAPI/Framework/IModMetadata.cs
@@ -31,7 +31,7 @@ namespace StardewModdingAPI.Framework
IMod Mod { get; }
/// <summary>The mod-provided API (if any).</summary>
- IModProvidedApi Api { get; }
+ object Api { get; }
/*********
@@ -45,7 +45,10 @@ namespace StardewModdingAPI.Framework
/// <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>
- IModMetadata SetMod(IMod mod, IModProvidedApi api);
+ IModMetadata SetMod(IMod mod);
+
+ /// <summary>Set the mod-provided API instance.</summary>
+ /// <param name="api">The mod-provided API.</param>
+ IModMetadata SetApi(object api);
}
}
diff --git a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
index 340205f3..949d986a 100644
--- a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
@@ -47,7 +47,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
}
/// <summary>Get the API provided by a mod, or <c>null</c> if it has none. This signature requires using the <see cref="IModHelper.Reflection"/> API to access the API's properties and methods.</summary>
- public IModProvidedApi GetApi(string uniqueID)
+ public object GetApi(string uniqueID)
{
return this.Registry.Get(uniqueID)?.Api;
}
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;
}