diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-03-21 23:12:26 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 17:00:55 -0400 |
commit | 332bcfa5a19509352aa417a04a677b5701c16986 (patch) | |
tree | 301a9f3e769d3b6e31434dae15161d120a65e825 /src/SMAPI/Framework/ModLoading/ModMetadata.cs | |
parent | dc0556ff5feead4ced16b82f407b6b271cbb3d30 (diff) | |
download | SMAPI-332bcfa5a19509352aa417a04a677b5701c16986.tar.gz SMAPI-332bcfa5a19509352aa417a04a677b5701c16986.tar.bz2 SMAPI-332bcfa5a19509352aa417a04a677b5701c16986.zip |
add content pack translations
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/ModMetadata.cs')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModMetadata.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ModLoading/ModMetadata.cs b/src/SMAPI/Framework/ModLoading/ModMetadata.cs index 4ff021b7..39f2f482 100644 --- a/src/SMAPI/Framework/ModLoading/ModMetadata.cs +++ b/src/SMAPI/Framework/ModLoading/ModMetadata.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using StardewModdingAPI.Framework.ModHelpers; using StardewModdingAPI.Toolkit.Framework.Clients.WebApi; using StardewModdingAPI.Toolkit.Framework.ModData; using StardewModdingAPI.Toolkit.Framework.UpdateData; @@ -46,6 +47,9 @@ namespace StardewModdingAPI.Framework.ModLoading /// <summary>The content pack instance (if loaded and <see cref="IsContentPack"/> is true).</summary> public IContentPack ContentPack { get; private set; } + /// <summary>The translations for this mod (if loaded).</summary> + public TranslationHelper Translations { get; private set; } + /// <summary>Writes messages to the console and log file as this mod.</summary> public IMonitor Monitor { get; private set; } @@ -100,26 +104,30 @@ namespace StardewModdingAPI.Framework.ModLoading /// <summary>Set the mod instance.</summary> /// <param name="mod">The mod instance to set.</param> - public IModMetadata SetMod(IMod mod) + /// <param name="translations">The translations for this mod (if loaded).</param> + public IModMetadata SetMod(IMod mod, TranslationHelper translations) { if (this.ContentPack != null) throw new InvalidOperationException("A mod can't be both an assembly mod and content pack."); this.Mod = mod; this.Monitor = mod.Monitor; + this.Translations = translations; return this; } /// <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> - public IModMetadata SetMod(IContentPack contentPack, IMonitor monitor) + /// <param name="translations">The translations for this mod (if loaded).</param> + public IModMetadata SetMod(IContentPack contentPack, IMonitor monitor, TranslationHelper translations) { if (this.Mod != null) throw new InvalidOperationException("A mod can't be both an assembly mod and content pack."); this.ContentPack = contentPack; this.Monitor = monitor; + this.Translations = translations; return this; } |