diff options
Diffstat (limited to 'src/SMAPI/Framework/IModMetadata.cs')
-rw-r--r-- | src/SMAPI/Framework/IModMetadata.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/IModMetadata.cs b/src/SMAPI/Framework/IModMetadata.cs index 38514959..6ee7df69 100644 --- a/src/SMAPI/Framework/IModMetadata.cs +++ b/src/SMAPI/Framework/IModMetadata.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using StardewModdingAPI.Framework.ModHelpers; using StardewModdingAPI.Framework.ModLoading; using StardewModdingAPI.Toolkit.Framework.Clients.WebApi; using StardewModdingAPI.Toolkit.Framework.ModData; @@ -15,10 +16,13 @@ namespace StardewModdingAPI.Framework /// <summary>The mod's display name.</summary> string DisplayName { get; } - /// <summary>The mod's full directory path.</summary> + /// <summary>The root path containing mods.</summary> + string RootPath { get; } + + /// <summary>The mod's full directory path within the <see cref="RootPath"/>.</summary> string DirectoryPath { get; } - /// <summary>The <see cref="DirectoryPath"/> relative to the game's Mods folder.</summary> + /// <summary>The <see cref="DirectoryPath"/> relative to the <see cref="RootPath"/>.</summary> string RelativeDirectoryPath { get; } /// <summary>Metadata about the mod from SMAPI's internal data (if any).</summary> @@ -42,6 +46,9 @@ namespace StardewModdingAPI.Framework /// <summary>The content pack instance (if loaded and <see cref="IModInfo.IsContentPack"/> is true).</summary> IContentPack ContentPack { get; } + /// <summary>The translations for this mod (if loaded).</summary> + TranslationHelper Translations { get; } + /// <summary>Writes messages to the console and log file as this mod.</summary> IMonitor Monitor { get; } @@ -67,12 +74,14 @@ namespace StardewModdingAPI.Framework /// <summary>Set the mod instance.</summary> /// <param name="mod">The mod instance to set.</param> - IModMetadata SetMod(IMod mod); + /// <param name="translations">The translations for this mod (if loaded).</param> + IModMetadata SetMod(IMod mod, TranslationHelper translations); /// <summary>Set the mod instance.</summary> /// <param name="contentPack">The contentPack instance to set.</param> /// <param name="monitor">Writes messages to the console and log file.</param> - IModMetadata SetMod(IContentPack contentPack, IMonitor monitor); + /// <param name="translations">The translations for this mod (if loaded).</param> + IModMetadata SetMod(IContentPack contentPack, IMonitor monitor, TranslationHelper translations); /// <summary>Set the mod-provided API instance.</summary> /// <param name="api">The mod-provided API.</param> @@ -102,5 +111,8 @@ namespace StardewModdingAPI.Framework /// <summary>Get whether the mod has a given warning and it hasn't been suppressed in the <see cref="DataRecord"/>.</summary> /// <param name="warning">The warning to check.</param> bool HasUnsuppressWarning(ModWarning warning); + + /// <summary>Get a relative path which includes the root folder name.</summary> + string GetRelativePathWithRoot(); } } |