summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModHelpers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-12-11 23:33:10 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-12-11 23:33:10 -0500
commit2c909f26fcf48fc1de7f3b23f5f83d28d4a5e253 (patch)
tree437e1eedf1bddf7204a800104c370cf238dcac3b /src/SMAPI/Framework/ModHelpers
parent971aff8368a8a2c196d942984926efc2f80cc216 (diff)
downloadSMAPI-2c909f26fcf48fc1de7f3b23f5f83d28d4a5e253.tar.gz
SMAPI-2c909f26fcf48fc1de7f3b23f5f83d28d4a5e253.tar.bz2
SMAPI-2c909f26fcf48fc1de7f3b23f5f83d28d4a5e253.zip
add prototype of mod-provided APIs (#409)
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers')
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
index 4e3f56de..340205f3 100644
--- a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
@@ -45,5 +45,11 @@ namespace StardewModdingAPI.Framework.ModHelpers
{
return this.Registry.Get(uniqueID) != null;
}
+
+ /// <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)
+ {
+ return this.Registry.Get(uniqueID)?.Api;
+ }
}
}