diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-23 20:31:46 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-23 20:31:46 -0500 |
commit | 26266a946dc1cbea18aef95bd04e9f2951c14b4c (patch) | |
tree | a8faa52b78ca2a465fb906a02d179c6f2107c785 /src/StardewModdingAPI | |
parent | 1dc3f1013f9aa654bdcf22cdd22f1efd3d5d2315 (diff) | |
download | SMAPI-26266a946dc1cbea18aef95bd04e9f2951c14b4c.tar.gz SMAPI-26266a946dc1cbea18aef95bd04e9f2951c14b4c.tar.bz2 SMAPI-26266a946dc1cbea18aef95bd04e9f2951c14b4c.zip |
revert Config.GenerateDefaultConfig<T> 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.
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r-- | src/StardewModdingAPI/Config.cs | 5 |
1 files changed, 4 insertions, 1 deletions
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 /// <summary>Get the default config values.</summary> [Obsolete("This base class is obsolete since SMAPI 1.0. See the latest project README for details.")] - public abstract T GenerateDefaultConfig<T>() where T : Config; + public virtual T GenerateDefaultConfig<T>() where T : Config + { + return null; + } /// <summary>Get the current configuration with missing values defaulted.</summary> /// <typeparam name="T">The config class type.</typeparam> |