summaryrefslogtreecommitdiff
path: root/src/SMAPI/IMod.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/IMod.cs')
-rw-r--r--src/SMAPI/IMod.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SMAPI/IMod.cs b/src/SMAPI/IMod.cs
index b81ba0e3..87c9880c 100644
--- a/src/SMAPI/IMod.cs
+++ b/src/SMAPI/IMod.cs
@@ -23,7 +23,15 @@ namespace StardewModdingAPI
/// <param name="helper">Provides simplified APIs for writing mods.</param>
void Entry(IModHelper helper);
- /// <summary>Get an API that other mods can access. This is always called after <see cref="Entry"/>.</summary>
+ /// <summary>Get an <a href="https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Integrations">API that other mods can access</a>. This is always called after <see cref="Entry"/>, and is only called once even if multiple mods access it.</summary>
+ /// <remarks>You can implement <see cref="GetApi()"/> to provide one instance to all mods, or <see cref="GetApi(IModInfo)"/> to provide a separate instance per mod. These are mutually exclusive, so you can only implement one of them.</remarks>
+ /// <remarks>Returns the API instance, or <c>null</c> if the mod has no API.</remarks>
object? GetApi();
+
+ /// <summary>Get an <a href="https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Integrations">API that other mods can access</a>. This is always called after <see cref="Entry"/>, and is called once per mod that accesses the API (even if they access it multiple times).</summary>
+ /// <param name="mod">The mod accessing the API.</param>
+ /// <remarks>Returns the API instance, or <c>null</c> if the mod has no API. Note that <paramref name="mod"/> is provided for informational purposes only, and that denying API access to specific mods is strongly discouraged and may be considered abusive.</remarks>
+ /// <inheritdoc cref="GetApi()" include="/Remarks" />
+ object? GetApi(IModInfo mod);
}
}