diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-10-31 20:44:31 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-10-31 20:44:31 -0400 |
commit | 9d461bb05bfa25c20cba46651f2ecf86028f1a1a (patch) | |
tree | 9a7a67f2fdb9cf9912db5879d483a9d2cd64255e /src/StardewModdingAPI | |
parent | 4cda3ec5bfdeadb85a9484f265c3f5707eac4506 (diff) | |
download | SMAPI-9d461bb05bfa25c20cba46651f2ecf86028f1a1a.tar.gz SMAPI-9d461bb05bfa25c20cba46651f2ecf86028f1a1a.tar.bz2 SMAPI-9d461bb05bfa25c20cba46651f2ecf86028f1a1a.zip |
make config class abstract to force implementation of required method
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r-- | src/StardewModdingAPI/Config.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/StardewModdingAPI/Config.cs b/src/StardewModdingAPI/Config.cs index f3f4f22a..7e5c4046 100644 --- a/src/StardewModdingAPI/Config.cs +++ b/src/StardewModdingAPI/Config.cs @@ -10,7 +10,7 @@ using Newtonsoft.Json.Linq; namespace StardewModdingAPI { - public class Config + public abstract class Config { [JsonIgnore] public virtual string ConfigLocation { get; protected internal set; } @@ -64,13 +64,8 @@ namespace StardewModdingAPI return ret; } - /// <summary> - /// MUST be implemented in inheriting class! - /// </summary> - public virtual T GenerateDefaultConfig<T>() where T : Config - { - return null; - } + /// <summary>Get the default config values.</summary> + public abstract T GenerateDefaultConfig<T>() where T : Config; /// <summary> /// Merges a default-value config with the user-config on disk. |