From eeb9e507da114c6121846aec6d71047bdb449ac0 Mon Sep 17 00:00:00 2001 From: Zoryn Aaron Date: Wed, 23 Mar 2016 12:28:50 -0400 Subject: config updates --- StardewModdingAPI/Config.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'StardewModdingAPI') diff --git a/StardewModdingAPI/Config.cs b/StardewModdingAPI/Config.cs index 62c26ca4..6fb13f6e 100644 --- a/StardewModdingAPI/Config.cs +++ b/StardewModdingAPI/Config.cs @@ -34,7 +34,7 @@ namespace StardewModdingAPI /// /// /// - internal virtual T LoadConfig() where T : Config + public virtual T LoadConfig() where T : Config { if (string.IsNullOrEmpty(ConfigLocation)) { @@ -79,17 +79,26 @@ namespace StardewModdingAPI /// /// MUST be implemented in inheriting class! /// - protected virtual T GenerateBaseConfig() where T : Config + public virtual T GenerateDefaultConfig() where T : Config { return null; } + /// + /// Use the public GenerateDefaultConfig insteaad + /// + [Obsolete] + protected virtual T GenerateBaseConfig() where T : Config + { + return GenerateDefaultConfig(); + } + /// /// Merges a default-value config with the user-config on disk. /// /// /// - internal virtual T UpdateConfig() where T : Config + public virtual T UpdateConfig() where T : Config { try { @@ -191,7 +200,6 @@ namespace StardewModdingAPI } } - [Obsolete] public partial class Config { [Obsolete] public static int invalids = 0; -- cgit