From 7ca5c52da54d2962e82e4c001c00d0c60c29b43e Mon Sep 17 00:00:00 2001
From: Aristeas <94058548+Jnick-24@users.noreply.github.com>
Date: Fri, 19 Apr 2024 22:46:01 -0500
Subject: [PATCH] Additional DefinitionApi documentation
---
.../Definitions/DefinitionApi.cs | 21 +++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/Data/Scripts/AssemblyScripts/Definitions/DefinitionApi.cs b/Data/Scripts/AssemblyScripts/Definitions/DefinitionApi.cs
index 6a12811..0841c55 100644
--- a/Data/Scripts/AssemblyScripts/Definitions/DefinitionApi.cs
+++ b/Data/Scripts/AssemblyScripts/Definitions/DefinitionApi.cs
@@ -27,10 +27,13 @@ public class ModularDefinitionApi
public Action OnReady;
///
- /// Call this to initialize the Modular API.
+ /// Call this to initialize the Modular API.
+ ///
+ /// API methods will be unusable until the endpoints are populated. Check or utilize for safety.
+ ///
///
///
- ///
+ /// Method to be triggered when the API is ready.
///
public ModularDefinitionApi(IMyModContext modContext, Action onLoad = null)
{
@@ -47,18 +50,24 @@ public ModularDefinitionApi(IMyModContext modContext, Action onLoad = null)
}
///
- /// The currently loaded Modular Assemblies Framework version. Don't touch this either.
+ /// The currently loaded Modular Assemblies Framework version.
+ ///
+ /// Not the API version; see
+ ///
///
public int FrameworkVersion { get; private set; } = -1;
///
- /// Displays whether the API is ready.
+ /// Displays whether endpoints are loaded and the API is ready for use.
///
public bool IsReady { get; private set; }
///
- /// Call this to unload the Modular API. It will be called automatically when the Modular Assemblies Framework is
- /// closed.
+ /// Call this to unload the Modular API; i.e. in case of instantiating a new API or for freeing up resources.
+ ///
+ /// This method will also be called automatically when the Modular Assemblies Framework is
+ /// closed.
+ ///
///
public void UnloadData()
{