diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-07 11:39:09 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-07 11:39:09 -0400 |
commit | f033b5a2f72b96168f6e20e96fa50742e70b01d6 (patch) | |
tree | 577e6eaad6c69f80e3c01fb8028bf195f6cbe358 /src | |
parent | c5e106801e9137078decfd6b6e3761240b47f94e (diff) | |
download | SMAPI-f033b5a2f72b96168f6e20e96fa50742e70b01d6.tar.gz SMAPI-f033b5a2f72b96168f6e20e96fa50742e70b01d6.tar.bz2 SMAPI-f033b5a2f72b96168f6e20e96fa50742e70b01d6.zip |
group mod helpers (#318)
Diffstat (limited to 'src')
-rw-r--r-- | src/StardewModdingAPI.Tests/Core/TranslationTests.cs | 1 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/ModHelpers/CommandHelper.cs (renamed from src/StardewModdingAPI/Framework/CommandHelper.cs) | 3 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs (renamed from src/StardewModdingAPI/Framework/ContentHelper.cs) | 2 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/ModHelpers/ModHelper.cs (renamed from src/StardewModdingAPI/Framework/ModHelper.cs) | 2 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/ModHelpers/ReflectionHelper.cs (renamed from src/StardewModdingAPI/ReflectionHelper.cs) | 2 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/ModHelpers/TranslationHelper.cs (renamed from src/StardewModdingAPI/Framework/TranslationHelper.cs) | 2 | ||||
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 1 | ||||
-rw-r--r-- | src/StardewModdingAPI/StardewModdingAPI.csproj | 12 |
8 files changed, 13 insertions, 12 deletions
diff --git a/src/StardewModdingAPI.Tests/Core/TranslationTests.cs b/src/StardewModdingAPI.Tests/Core/TranslationTests.cs index ce3431e4..fceef0a3 100644 --- a/src/StardewModdingAPI.Tests/Core/TranslationTests.cs +++ b/src/StardewModdingAPI.Tests/Core/TranslationTests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using NUnit.Framework; using StardewModdingAPI.Framework; +using StardewModdingAPI.Framework.ModHelpers; using StardewValley; namespace StardewModdingAPI.Tests.Core diff --git a/src/StardewModdingAPI/Framework/CommandHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/CommandHelper.cs index 86734fc5..5fd56fdf 100644 --- a/src/StardewModdingAPI/Framework/CommandHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelpers/CommandHelper.cs @@ -1,6 +1,6 @@ using System; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModHelpers { /// <summary>Provides an API for managing console commands.</summary> internal class CommandHelper : ICommandHelper @@ -15,7 +15,6 @@ namespace StardewModdingAPI.Framework private readonly CommandManager CommandManager; - /********* ** Public methods *********/ diff --git a/src/StardewModdingAPI/Framework/ContentHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs index 0c09fe94..4fc46dd0 100644 --- a/src/StardewModdingAPI/Framework/ContentHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs @@ -13,7 +13,7 @@ using xTile; using xTile.Format; using xTile.Tiles; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModHelpers { /// <summary>Provides an API for loading content assets.</summary> internal class ContentHelper : IContentHelper diff --git a/src/StardewModdingAPI/Framework/ModHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/ModHelper.cs index 5a8ce459..965a940a 100644 --- a/src/StardewModdingAPI/Framework/ModHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelpers/ModHelper.cs @@ -2,7 +2,7 @@ using System.IO; using StardewModdingAPI.Framework.Serialisation; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModHelpers { /// <summary>Provides simplified APIs for writing mods.</summary> internal class ModHelper : IModHelper, IDisposable diff --git a/src/StardewModdingAPI/ReflectionHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/ReflectionHelper.cs index 56754cb4..5a21d999 100644 --- a/src/StardewModdingAPI/ReflectionHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelpers/ReflectionHelper.cs @@ -1,7 +1,7 @@ using System; using StardewModdingAPI.Framework.Reflection; -namespace StardewModdingAPI +namespace StardewModdingAPI.Framework.ModHelpers { /// <summary>Provides helper methods for accessing private game code.</summary> /// <remarks>This implementation searches up the type hierarchy, and caches the reflected fields and methods with a sliding expiry (to optimise performance without unnecessary memory usage).</remarks> diff --git a/src/StardewModdingAPI/Framework/TranslationHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/TranslationHelper.cs index fe387789..86737f85 100644 --- a/src/StardewModdingAPI/Framework/TranslationHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelpers/TranslationHelper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using StardewValley; -namespace StardewModdingAPI.Framework +namespace StardewModdingAPI.Framework.ModHelpers { /// <summary>Provides translations stored in the mod's <c>i18n</c> folder, with one file per locale (like <c>en.json</c>) containing a flat key => value structure. Translations are fetched with locale fallback, so missing translations are filled in from broader locales (like <c>pt-BR.json</c> < <c>pt.json</c> < <c>default.json</c>).</summary> internal class TranslationHelper : ITranslationHelper diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 3b3f99b3..97bc0256 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -17,6 +17,7 @@ using StardewModdingAPI.Events; using StardewModdingAPI.Framework; using StardewModdingAPI.Framework.Logging; using StardewModdingAPI.Framework.Models; +using StardewModdingAPI.Framework.ModHelpers; using StardewModdingAPI.Framework.ModLoading; using StardewModdingAPI.Framework.Reflection; using StardewModdingAPI.Framework.Serialisation; diff --git a/src/StardewModdingAPI/StardewModdingAPI.csproj b/src/StardewModdingAPI/StardewModdingAPI.csproj index efef87b1..da058fb0 100644 --- a/src/StardewModdingAPI/StardewModdingAPI.csproj +++ b/src/StardewModdingAPI/StardewModdingAPI.csproj @@ -128,6 +128,11 @@ <Compile Include="Framework\Countdown.cs" /> <Compile Include="Framework\IModMetadata.cs" /> <Compile Include="Framework\Models\DisabledMod.cs" /> + <Compile Include="Framework\ModHelpers\CommandHelper.cs" /> + <Compile Include="Framework\ModHelpers\ContentHelper.cs" /> + <Compile Include="Framework\ModHelpers\ModHelper.cs" /> + <Compile Include="Framework\ModHelpers\ReflectionHelper.cs" /> + <Compile Include="Framework\ModHelpers\TranslationHelper.cs" /> <Compile Include="Framework\ModLoading\InvalidModStateException.cs" /> <Compile Include="Framework\ModLoading\ModDependencyStatus.cs" /> <Compile Include="Framework\ModLoading\ModMetadataStatus.cs" /> @@ -135,7 +140,6 @@ <Compile Include="Framework\ModLoading\AssemblyDefinitionResolver.cs" /> <Compile Include="Framework\ModLoading\AssemblyParseResult.cs" /> <Compile Include="Framework\CommandManager.cs" /> - <Compile Include="Framework\ContentHelper.cs" /> <Compile Include="Framework\Content\AssetData.cs" /> <Compile Include="Framework\Content\AssetDataForObject.cs" /> <Compile Include="Framework\Content\AssetDataForDictionary.cs" /> @@ -143,20 +147,17 @@ <Compile Include="Context.cs" /> <Compile Include="Framework\Logging\ConsoleInterceptionManager.cs" /> <Compile Include="Framework\Logging\InterceptingTextWriter.cs" /> - <Compile Include="Framework\CommandHelper.cs" /> <Compile Include="Framework\Models\ManifestDependency.cs" /> <Compile Include="Framework\Models\ModCompatibilityType.cs" /> <Compile Include="Framework\Models\SConfig.cs" /> <Compile Include="Framework\ModLoading\ModMetadata.cs" /> <Compile Include="Framework\Reflection\PrivateProperty.cs" /> - <Compile Include="ReflectionHelper.cs" /> <Compile Include="Framework\RequestExitDelegate.cs" /> <Compile Include="Framework\SContentManager.cs" /> <Compile Include="Framework\Exceptions\SParseException.cs" /> <Compile Include="Framework\Serialisation\JsonHelper.cs" /> <Compile Include="Framework\Serialisation\SelectiveStringEnumConverter.cs" /> <Compile Include="Framework\Serialisation\ManifestFieldConverter.cs" /> - <Compile Include="Framework\TranslationHelper.cs" /> <Compile Include="IAssetEditor.cs" /> <Compile Include="IAssetInfo.cs" /> <Compile Include="IAssetLoader.cs" /> @@ -200,7 +201,6 @@ <Compile Include="Framework\Monitor.cs" /> <Compile Include="Framework\Models\Manifest.cs" /> <Compile Include="Mod.cs" /> - <Compile Include="Framework\ModHelper.cs" /> <Compile Include="PatchMode.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -282,7 +282,7 @@ <StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram> <StartWorkingDirectory>$(GamePath)</StartWorkingDirectory> </PropertyGroup> - + <!-- Somehow this makes Visual Studio for Mac recognise the previous section. --> <!-- Nobody knows why. --> <PropertyGroup Condition="'$(RunConfiguration)' == 'Default'" /> |