From 929dccb75a1405737975d76648e015a3e7c00177 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 23:07:10 -0400 Subject: reorganise repo structure --- src/StardewModdingAPI/IModHelper.cs | 58 ------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/StardewModdingAPI/IModHelper.cs (limited to 'src/StardewModdingAPI/IModHelper.cs') diff --git a/src/StardewModdingAPI/IModHelper.cs b/src/StardewModdingAPI/IModHelper.cs deleted file mode 100644 index 116e8508..00000000 --- a/src/StardewModdingAPI/IModHelper.cs +++ /dev/null @@ -1,58 +0,0 @@ -namespace StardewModdingAPI -{ - /// Provides simplified APIs for writing mods. - public interface IModHelper - { - /********* - ** Accessors - *********/ - /// The full path to the mod's folder. - string DirectoryPath { get; } - - /// An API for loading content assets. - IContentHelper Content { get; } - - /// Simplifies access to private game code. - IReflectionHelper Reflection { get; } - - /// Metadata about loaded mods. - IModRegistry ModRegistry { get; } - - /// An API for managing console commands. - ICommandHelper ConsoleCommands { get; } - - /// Provides translations stored in the mod's i18n folder, with one file per locale (like en.json) containing a flat key => value structure. Translations are fetched with locale fallback, so missing translations are filled in from broader locales (like pt-BR.json < pt.json < default.json). - ITranslationHelper Translation { get; } - - - /********* - ** Public methods - *********/ - /**** - ** Mod config file - ****/ - /// Read the mod's configuration file (and create it if needed). - /// The config class type. This should be a plain class that has public properties for the settings you want. These can be complex types. - TConfig ReadConfig() where TConfig : class, new(); - - /// Save to the mod's configuration file. - /// The config class type. - /// The config settings to save. - void WriteConfig(TConfig config) where TConfig : class, new(); - - /**** - ** Generic JSON files - ****/ - /// Read a JSON file. - /// The model type. - /// The file path relative to the mod directory. - /// Returns the deserialised model, or null if the file doesn't exist or is empty. - TModel ReadJsonFile(string path) where TModel : class; - - /// Save to a JSON file. - /// The model type. - /// The file path relative to the mod directory. - /// The model to save. - void WriteJsonFile(string path, TModel model) where TModel : class; - } -} \ No newline at end of file -- cgit