From 26266a946dc1cbea18aef95bd04e9f2951c14b4c Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 23 Nov 2016 20:31:46 -0500 Subject: revert Config.GenerateDefaultConfig back to virtual method SMAPI 1.0 changed this virtual method to abstract, since it's required for the configuration to work correctly. However this breaks some incorrectly-written older mods which didn't implement the method. Since this class is deprecated anyway, revert to the original behaviour for compatibility. --- src/StardewModdingAPI/Config.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/StardewModdingAPI/Config.cs b/src/StardewModdingAPI/Config.cs index 0d94ba76..037c0fdf 100644 --- a/src/StardewModdingAPI/Config.cs +++ b/src/StardewModdingAPI/Config.cs @@ -72,7 +72,10 @@ namespace StardewModdingAPI /// Get the default config values. [Obsolete("This base class is obsolete since SMAPI 1.0. See the latest project README for details.")] - public abstract T GenerateDefaultConfig() where T : Config; + public virtual T GenerateDefaultConfig() where T : Config + { + return null; + } /// Get the current configuration with missing values defaulted. /// The config class type. -- cgit